Date: Mon, 28 Nov 2005 22:08:47 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: Darren Pilgrim <darren.pilgrim@bitfreak.org> Cc: stable@freebsd.org Subject: Re: Unable to set device characteristics with devd Message-ID: <20051129060847.GA26275@odin.ac.hmc.edu> In-Reply-To: <000801c5f4aa$b7d340a0$642a15ac@smiley> References: <20051129054922.48ACA5D0A@ptavv.es.net> <000801c5f4aa$b7d340a0$642a15ac@smiley>
next in thread | previous in thread | raw e-mail | index | archive | help
--KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 28, 2005 at 10:04:05PM -0800, Darren Pilgrim wrote: > From: Kevin Oberman > >=20 > > I've been trying to use devd for a number of things, but have=20 > > not gotten > > far. > >=20 > > One issue is when I attach an ATAPI disk: > > attach 100 { > > device-name "acd0"; > > action "/bin/chmod 666 /dev/$device-name"; > > } > >=20 > > I have similar statements for my second hard drive (ad2s2). > >=20 > > By using the -D option I see the device attach, but the chmod returns > > an error indicating that /dev/acd0 does not exist. I get=20 > > similar results for other devices. > >=20 > > Is there a delay between the attach event and the creation of the /dev > > entry? Am I missing something here? Maybe I should use devfs for this. >=20 > The normal tools (chmod, chown, etc.) don't work on devfs. You need to > create devfs rules to change permissions, ownership, etc. on device nodes. Nope. It's a race. I wouldn't count on devd getting there either early enough or late enough. [10:07pm] brooks@pagefault (~): uname -a FreeBSD pagefault 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Sun Nov 20 20:37:29 P= ST 2005 ... [10:07pm] brooks@pagefault (~): ls -l /dev/cuad0 crw-rw---- 1 uucp dialer 0, 74 Nov 28 10:15 /dev/cuad0 [10:07pm] brooks@pagefault (~): sudo chmod 666 /dev/cuad0 Password: [10:07pm] brooks@pagefault (~): ls -l /dev/cuad0 crw-rw-rw- 1 uucp dialer 0, 74 Nov 28 10:15 /dev/cuad0 [10:07pm] brooks@pagefault (~): > See devfs.rules(5) and devfs.conf(5). Yes. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --KsGdsel6WgEHnImy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDi/BuXY6L6fI4GtQRApyqAKCLR8UKVxp78W3mICRoslhacIi8rgCeMqCq ENBgsSM9TYkcKQ5B24KZLxs= =RLc+ -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051129060847.GA26275>