devfs rules

Hi, in the CUPS part of the handbook it says to add this to /etc/devfs.rules
Code:
[system=10]
add path 'unlpt*' mode 0660 group cups 
add path 'ulpt*' mode 0660 group cups 
add path 'lpt*' mode 0660 group cups 
add path 'usb/X.Y.Z' mode 0660 group cups
And to /etc/rc.conf
Code:
devfs_system_ruleset="system"

But to mount USB I need this
Code:
[localrules=5]
add path 'da*' mode 0660 group operator
And in rc.conf
Code:
devfs_system_ruleset="localrules"

So how can I add both?
 
Why not merge both rules ?

Something like:

Code:
[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'usb/X.Y.Z' mode 0660 group cups
add path 'da*' mode 0660 group operator

And using devfs_system_ruleset="system"
 
You can "cascade" the rules by including another set of rules to your rules, this is from /etc/defaults/devfs.rules the ruleset that can be used for jails as it is:

Code:
# Devices usually found in a jail.
#
[devfsrules_jail=4]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add path zfs unhide

I left out the earlier entries devfsrules_hide_all, devfsrules_unhide_basic and devfsrules_unhide_login, they have to be present in the ruleset or you'll get an error.
 
Why not merge both rules ?

Something like:

Code:
[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'usb/X.Y.Z' mode 0660 group cups
add path 'da*' mode 0660 group operator

And using devfs_system_ruleset="system"
Ok, I didn't know I could do that, I thought that I should set both [system=10] and [localrules=5] and I couldn't put rules together. Thanks
 
Back
Top