Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Nov 2005 09:22:46 -0600
From:      David Kelly <dkelly@hiwaay.net>
To:        FreeBSD-Questions@freebsd.org
Subject:   Re: devfs and bpf owner, group, and mode
Message-ID:  <20051109152246.GA53278@Grumpy.DynDNS.org>
In-Reply-To: <44wtjhaoaj.fsf@be-well.ilk.org>
References:  <20051108150817.GA47825@Grumpy.DynDNS.org> <44wtjhaoaj.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 09, 2005 at 09:28:20AM -0500, Lowell Gilbert wrote:
> David Kelly <dkelly@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@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051109152246.GA53278>