From owner-freebsd-stable@FreeBSD.ORG Tue Nov 29 23:20:52 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 8890116A420 for ; Tue, 29 Nov 2005 23:20:52 +0000 (GMT) (envelope-from oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D0CA43D96 for ; Tue, 29 Nov 2005 23:20:37 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Tue, 29 Nov 2005 15:20:22 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id F0D7C5D04; Tue, 29 Nov 2005 15:20:03 -0800 (PST) To: "Darren Pilgrim" In-reply-to: Your message of "Mon, 28 Nov 2005 22:04:05 PST." <000801c5f4aa$b7d340a0$642a15ac@smiley> Date: Tue, 29 Nov 2005 15:20:03 -0800 From: "Kevin Oberman" Message-Id: <20051129232003.F0D7C5D04@ptavv.es.net> 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 23:20:52 -0000 > From: "Darren Pilgrim" > Date: Mon, 28 Nov 2005 22:04:05 -0800 > > 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. > > See devfs.rules(5) and devfs.conf(5). Bingo, but you really need to see the handbook. I challenge anyone to figure this out from just the man pages. (And the relevant text in the handbook is in the section on scanner under "Allowing Scanner Access to Other Users".) In any case, once I found the magic rc.conf bit (which I had almost guessed right from reading the devfs startup script), it works like a charm! I'd also like to create links for /dev/dvd and /dev/cdrom, like I can do in devfs.conf, but that's easy enough to work around. And thanks to Brooks for suggesting the same thing a few minutes after Darren. I just did not understand the timing issues involved in devd (which is still really cool). -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634