From owner-freebsd-stable@FreeBSD.ORG Tue Nov 29 06:08:59 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 245CE16A42B for ; Tue, 29 Nov 2005 06:08:59 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 936D043D53 for ; Tue, 29 Nov 2005 06:08:58 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jAT68lNR003917; Mon, 28 Nov 2005 22:08:47 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jAT68liD003916; Mon, 28 Nov 2005 22:08:47 -0800 Date: Mon, 28 Nov 2005 22:08:47 -0800 From: Brooks Davis To: Darren Pilgrim Message-ID: <20051129060847.GA26275@odin.ac.hmc.edu> References: <20051129054922.48ACA5D0A@ptavv.es.net> <000801c5f4aa$b7d340a0$642a15ac@smiley> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <000801c5f4aa$b7d340a0$642a15ac@smiley> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: stable@freebsd.org Subject: Re: Unable to set device characteristics with devd X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2005 06:08:59 -0000 --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--