Unable to set device characteristics with devd
Brooks Davis
brooks at one-eyed-alien.net
Tue Nov 29 06:08:59 GMT 2005
On Mon, Nov 28, 2005 at 10:04:05PM -0800, Darren Pilgrim wrote:
> From: Kevin Oberman
> >
> > I've been trying to use devd for a number of things, but have
> > not gotten
> > far.
> >
> > One issue is when I attach an ATAPI disk:
> > attach 100 {
> > device-name "acd0";
> > action "/bin/chmod 666 /dev/$device-name";
> > }
> >
> > I have similar statements for my second hard drive (ad2s2).
> >
> > 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
> > similar results for other devices.
> >
> > 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.
>
> 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 at pagefault (~): uname -a
FreeBSD pagefault 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Sun Nov 20 20:37:29 PST 2005 ...
[10:07pm] brooks at pagefault (~): ls -l /dev/cuad0
crw-rw---- 1 uucp dialer 0, 74 Nov 28 10:15 /dev/cuad0
[10:07pm] brooks at pagefault (~): sudo chmod 666 /dev/cuad0
Password:
[10:07pm] brooks at pagefault (~): ls -l /dev/cuad0
crw-rw-rw- 1 uucp dialer 0, 74 Nov 28 10:15 /dev/cuad0
[10:07pm] brooks at pagefault (~):
> See devfs.rules(5) and devfs.conf(5).
Yes.
-- Brooks
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20051128/3fd0f01f/attachment.bin
More information about the freebsd-stable
mailing list