Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2005 17:54:16 +0100
From:      Marwan Burelle <Marwan.Burelle@lri.fr>
To:        "[LoN]Kamikaze" <LoN_Kamikaze@gmx.de>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: devfs doesn't set access rights
Message-ID:  <20051213165416.GE71643@pc5-179.lri.fr>
In-Reply-To: <439EF8B5.4030702@gmx.de>
References:  <439EF8B5.4030702@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--f+W+jCU1fRNres8c
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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).
>=20
> 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"=A9 ;)

--=20
Burelle Marwan,
Equipe Bases de Donnees - LRI
http://www.cduce.org
(burelle@lri.fr | Marwan.Burelle@ens.fr)
--f+W+jCU1fRNres8c
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDnvy4I+2UvUKfgvgRAoD8AJwMSKjANhbVe4gz3ETOLwJwsRA7VwCgo9oi
w/Tfce97+u/lBcMF5I+9PYA=
=Xy4e
-----END PGP SIGNATURE-----

--f+W+jCU1fRNres8c--



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