/dev/ulpt0 -- How is it created?

2012-02-08 Thread Robert Huff

Ronald F. Guilmette writes:

>  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.
>  
>  (Sorry, yes, I'm almost totally ignorant about how these kinds of
>  transient device nodes get automagically created these days.)

man devfs.rules?


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: /dev/ulpt0 -- How is it created?

2012-02-08 Thread Devin Teske


> -Original Message-
> From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
> questi...@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.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


/dev/ulpt0 -- How is it created?

2012-02-08 Thread Ronald F. Guilmette

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.

(Sorry, yes, I'm almost totally ignorant about how these kinds of
transient device nodes get automagically created these days.)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"