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"© ;)

-- 
Burelle Marwan,
Equipe Bases de Donnees - LRI
http://www.cduce.org
([EMAIL PROTECTED] | [EMAIL PROTECTED])

Attachment: pgpk9kzQzAGwW.pgp
Description: PGP signature

Reply via email to