devfs and bpf owner, group, and mode

David Kelly dkelly at hiwaay.net
Wed Nov 9 15:22:49 GMT 2005


On Wed, Nov 09, 2005 at 09:28:20AM -0500, Lowell Gilbert wrote:
> David Kelly <dkelly at hiwaay.net> writes:
> 
> > I'm having problems in 5.4 getting automatic ownership and mode correct
> > on /dev/bpf2. Added this to /etc/devfs.conf:

[...]

> > Suspect my problem is related to [devfsrules_bpf=5] or the fact I
> > haven't informed the system to apply this rule to the /dev filesystem.
> 
> Good guess.  I'm still on my first cup of coffee, and might have taken
> a few more minutes to spot that.

I got stuck in /etc/rc.subr studying the devfs routines without thinking
to search for where they were called, /etc/rc.d/devfs.

> > So where is the 'i' that I've failed to dot?
> 
> try adding 'devfs_system_ruleset="devfsrules_bpf"' to rc.conf.

Thats a leap I still haven't grasped from documentation and reading the
scripts. Exactly the sort of thing hoped for by asking here!

> To apply it before reboot would be something roughly like 
> 'devfs /dev ruleset devfsrules_bpf'.  

First couple of tries on variations of that didn't go. When is
devfs.rules read? This did work:
devfs add path 'bpf*' mode 0660 group tcpdump

But by that time I had "devfs -m /dev ruleset 5" in effect which may
have contributed to "devfs add path".

/dev/bpf2 didn't exist, as mere user I launched tcpdump on my vlan0
device and /dev/bpf2 was created correctly! Hurray! Will see if
'devfs_system_ruleset="devfsrules_bpf"' works on reboot sometime later.
:-)

-- 
David Kelly N4HHE, dkelly at HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.


More information about the freebsd-questions mailing list