Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Feb 2012 14:22:39 -0800
From:      Devin Teske <devin.teske@fisglobal.com>
To:        "'Ronald F. Guilmette'" <rfg@tristatelogic.com>, <freebsd-questions@freebsd.org>
Subject:   RE: /dev/ulpt0 -- How is it created?
Message-ID:  <069401cce6b0$2e55cfb0$8b016f10$@fisglobal.com>
In-Reply-To: <2068.1328738290@tristatelogic.com>
References:  <2068.1328738290@tristatelogic.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help


> -----Original Message-----
> From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-
> questions@freebsd.org] On Behalf Of Ronald F. Guilmette
> Sent: Wednesday, February 08, 2012 1:58 PM
> To: freebsd-questions@freebsd.org
> Subject: /dev/ulpt0 -- How is it created?
> 
> 
> It would appear that the device node /dev/ulpt0 gets (re-)created every
> time I plug my USB printer back in.
> 
> Could somebody please kindly tell me what the exact mechanism is that
> causes this device node to be (re-)created upon such events?
> 
> I am rather hoping that whatever that mechanism is, that I can diddle
> it somehow so that every time /dev/ulpt0 gets created, it will be
> created with perms set to 0666.
> 

This should do the trick (as root):

mkdir -p /etc/devd
cd /etc/devd
touch ulpt.conf
cat >> ulpt.conf << EOF
notify 100 {
	match "system"    "DEVFS";
	match "subsystem" "CDEV";
	match "cdev"      "ulpt[0-9]";
	match "type"      "CREATE";

	action "/bin/chmod 666 /dev/$cdev";
};
EOF
service devd restart
-- 
Devin


_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?069401cce6b0$2e55cfb0$8b016f10$>