devfs.rules include rule question in 6.2 release

Geoff Roberts geoff at apro.com.au
Wed Jan 2 00:45:46 PST 2008


Hi,

It seems you can't recursively use the "include" rule specification with devfs 
in Freebsd 6.2. I couldn't see a note about this in the devfs man page so I'm 
not sure whether this is expected behaviour or not.

For example, the devfsrules_jail is defined as the following 
in /etc/defaults/devfs.rules

[devfsrules_jail=4]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login

When I create a custom rule in /etc/devfs.rules such as the following:

[devfsrules_unhide_bpf=10]
add path 'bpf*' unhide

[devfsrules_dhcp=11]
add include $devfsrules_jail
add include $devfsrules_unhide_bpf

All devices are actually enabled in my jail without any errors.

However, if I change my devfsrules_dhcp so that I don't have any 
sub "includes" everything works OK:

[devfsrules_dhcp=11]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add include $devfsrules_unhide_bpf

Obviously the first version is preferable as I don't need to know about the 
inner workings of devfsrules_jail - particularly during upgrades.

Is that the expected behaviour?

Kind regards,

Geoff



More information about the freebsd-stable mailing list