devfs doesn't set access rights

Anish Mistry mistry.7 at osu.edu
Tue Dec 13 09:22:31 PST 2005


On Tuesday 13 December 2005 11:54 am, Marwan Burelle 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?
>
> It is the normal behaviour, /etc/rc.d/devfs is a little script that
> parse /etc/devfs.conf and according to it and what it find in /dev
> it set permissions or create links, it's purely static.
>
> One possibility is to call /etc/rc.d/devfs when a device is
> attached in /etc/devd.conf (take a look at devd(8) and
> devd.conf(5))
>
> For exemple, I have something like this in my /etc/devd.conf :
>
> attach 100 {
>     device-name "umass[0-9]+" ;
>     action "/bin/sleep 3; /etc/rc.d/devfs restart" ;
> };
>
> "attach" : what kind of event
> "100" : as usual, for ordering rules
> "device-name ..." : the device concerned
> "action ... " : what to do, here I use sleep, because action is
> called when the attach event arrives, not when the device node is
> created.
>
> There maybe a better way, but "it works"© ;)
You should be using /etc/devfs.rules

Search the mailing list for examples and setup.

-- 
Anish Mistry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20051213/26cbf320/attachment.bin


More information about the freebsd-stable mailing list