From owner-freebsd-stable@FreeBSD.ORG Tue Dec 13 19:44:48 2005 Return-Path: X-Original-To: freebsd-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 C678E16A422 for ; Tue, 13 Dec 2005 19:44:48 +0000 (GMT) (envelope-from oberman@es.net) Received: from postal2.es.net (postal2.es.net [198.128.3.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6648743D46 for ; Tue, 13 Dec 2005 19:44:44 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal2.es.net (Postal Node 2) with ESMTP (SSL) id IBA74465; Tue, 13 Dec 2005 11:44:40 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 9F5EF5D09; Tue, 13 Dec 2005 11:44:38 -0800 (PST) To: Brooks Davis In-reply-to: Your message of "Tue, 13 Dec 2005 11:21:43 PST." <20051213192143.GA5926@odin.ac.hmc.edu> Date: Tue, 13 Dec 2005 11:44:38 -0800 From: "Kevin Oberman" Message-Id: <20051213194438.9F5EF5D09@ptavv.es.net> Cc: "\[LoN\]Kamikaze" , freebsd-stable@freebsd.org Subject: Re: devfs doesn't set access rights 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, 13 Dec 2005 19:44:49 -0000 > Date: Tue, 13 Dec 2005 11:21:43 -0800 > From: Brooks Davis > Sender: owner-freebsd-stable@freebsd.org > > On Tue, Dec 13, 2005 at 07:04:18PM +0100, Roland Smith wrote: > > On Tue, Dec 13, 2005 at 08:49:47AM -0800, Brooks Davis wrote: > > > 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). > > > > > > > > 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? > > > > > > This is normal. devfs.conf is for boot only, you need devfs.rules for > > > runtime. Unfortunatly, the documentation of this fact and the > > > docuementation of devfs.rules sucks. > > > > Hmm, it's quite explicitly mentioned in the manual pages for devfs.conf > > and devfs.rules. > > > > Feel free to suggest improvements... > > 90% of the problem is the existence of devfs.conf. devfs(8) appears > capable of everything it does, but we still have two ways to do it which > is gratuitously confusing. The devfs(8) documentation is lacking in a > complete, working example, any documentation of the rc.conf variables > (which also aren't documented in rc.conf(5) either), and any mention of > that the purpose or usage of lines like: > > [devfsrules_unhide_basic=2] Thee is clearly the big issues, but devfs.conf seems to have one capability that devfs.rules lacks...the ability to create symlinks in the devfs. Lots of folks create symlinks to /dev/cdrom and/or /dev/dvd, among others and I can't see any way to make devfs.rules do this. I suspect that the capability could be added, though, which would make devfs.conf totally redundant. I have been hacking away at the various devd and devfs man pages this morning to make them a bit better. /etc/defaults/rc.conf and rc.conf(5) also need to be fixed. (Those are next on my hit list.) > Setting the mode of a device node really ought to be trivial, but last > time I looked at it I was clearly missing something and couldn't get it > working. I decided the device in question really ought to be attached > at boot and thus gave up and used devfs.conf since I had productive > work to do. Some cook easy to use cookbook example would be really > helpful for those who don't have time to figure out all the details. > Comparativly few people will want to do anything more than make a device > or two more accessable. I have not had any problem setting the mode of devices in devfs.rules. In fact, at this time, it's the only thing I use devfs.rules for. I thought that the example in devfs.rules(5) was pretty clear and I just added them (I had a couple) and they worked! It may be setting the mode (or anything else) at boot time as opposed to when a devfs entry is created on the fly does not work correctly (and, hence, the need for devfs.conf). -- 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