/dev/ulpt0 -- How is it created?

Devin Teske devin.teske at fisglobal.com
Wed Feb 8 22:22:38 UTC 2012



> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org [mailto:owner-freebsd-
> questions at freebsd.org] On Behalf Of Ronald F. Guilmette
> Sent: Wednesday, February 08, 2012 1:58 PM
> To: freebsd-questions at 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.


More information about the freebsd-questions mailing list