Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2005 11:44:38 -0800
From:      "Kevin Oberman" <oberman@es.net>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        "\[LoN\]Kamikaze" <LoN_Kamikaze@gmx.de>, freebsd-stable@freebsd.org
Subject:   Re: devfs doesn't set access rights 
Message-ID:  <20051213194438.9F5EF5D09@ptavv.es.net>
In-Reply-To: Your message of "Tue, 13 Dec 2005 11:21:43 PST." <20051213192143.GA5926@odin.ac.hmc.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Tue, 13 Dec 2005 11:21:43 -0800
> From: Brooks Davis <brooks@one-eyed-alien.net>
> Sender: owner-freebsd-stable@freebsd.org
> 
> On Tue, Dec 13, 2005 at 07:04:18PM +0100, Roland Smith wrote:
> > On Tue, Dec 13, 2005 at 08:49:47AM -0800, Brooks Davis wrote:
> > > On Tue, Dec 13, 2005 at 05:37:09PM +0100, [LoN]Kamikaze wrote:
> > > > On my FreeBSD 6-stable (the last build is less then 24hours ago) my
> > > > devfs doesn't apply permissions set in /etc/devfs.conf when I attach > new
> > > > devices. I have to call:
> > > > /etc/rc.d/devfs restart
> > > > manually for the settings to be applied. This is rather uncomfortable>  in
> > > > some cases (especially with my PDA).
> > > > 
> > > > I don't know weather this is the normal behaviour, anyway if it is,
> > > > shouldn't devfs be restarted automatically as soon as external devices
> > > > (usb, firewire, ir) are attached?
> > > 
> > > This is normal.  devfs.conf is for boot only, you need devfs.rules for
> > > runtime.  Unfortunatly, the documentation of this fact and the
> > > docuementation of devfs.rules sucks.
> > 
> > Hmm, it's quite explicitly mentioned in the manual pages for devfs.conf 
> > and devfs.rules. 
> > 
> > Feel free to suggest improvements...
> 
> 90% of the problem is the existence of devfs.conf. devfs(8) appears
> capable of everything it does, but we still have two ways to do it which
> is gratuitously confusing.  The devfs(8) documentation is lacking in a
> complete, working example, any documentation of the rc.conf variables
> (which also aren't documented in rc.conf(5) either), and any mention of
> that the purpose or usage of lines like:
> 
> [devfsrules_unhide_basic=2]

Thee is clearly the big issues, but devfs.conf seems to have one
capability that devfs.rules lacks...the ability to create symlinks in
the devfs. Lots of folks create symlinks to /dev/cdrom and/or /dev/dvd,
among others and I can't see any way to make devfs.rules do this. I
suspect that the capability could be added, though, which would make
devfs.conf totally redundant.

I have been hacking away at the various devd and devfs man pages this
morning to make them a bit better. /etc/defaults/rc.conf and rc.conf(5)
also need to be fixed. (Those are next on my hit list.)

> Setting the mode of a device node really ought to be trivial, but last
> time I looked at it I was clearly missing something and couldn't get it
> working.  I decided the device in question really ought to be attached
> at boot and thus gave up and used devfs.conf since I had productive
> work to do.  Some cook easy to use cookbook example would be really
> helpful for those who don't have time to figure out all the details.
> Comparativly few people will want to do anything more than make a device
> or two more accessable.

I have not had any problem setting the mode of devices in devfs.rules.
In fact, at this time, it's the only thing I use devfs.rules for. I
thought that the example in devfs.rules(5) was pretty clear and I just
added them (I had a couple) and they worked! It may be setting the mode
(or anything else) at boot time as opposed to when a devfs entry is
created on the fly does not work correctly (and, hence, the need for
devfs.conf). 
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634



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