From owner-freebsd-stable@FreeBSD.ORG Tue Dec 13 22:26:47 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 82C5816A41F for ; Tue, 13 Dec 2005 22:26:47 +0000 (GMT) (envelope-from lonewolf-freebsd@earthmagic.org) Received: from ppp162-248.static.internode.on.net (ppp162-248.static.internode.on.net [150.101.162.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8166443D55 for ; Tue, 13 Dec 2005 22:26:46 +0000 (GMT) (envelope-from lonewolf-freebsd@earthmagic.org) Received: from [192.168.2.3] (sarah.zone2.earthmagic.org [192.168.2.3]) by ppp162-248.static.internode.on.net (Postfix-MSA) with ESMTP id 520BE91F1; Wed, 14 Dec 2005 09:26:45 +1100 (EST) Message-ID: <439F4AA4.5070500@earthmagic.org> Date: Wed, 14 Dec 2005 09:26:44 +1100 From: Johny Mattsson User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051003) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "[LoN]Kamikaze" , freebsd-stable@freebsd.org References: <439EF8B5.4030702@gmx.de> <20051213164947.GA17705@odin.ac.hmc.edu> <20051213180418.GA20852@slackbox.xs4all.nl> <20051213192143.GA5926@odin.ac.hmc.edu> <439F24B2.1080408@gmx.de> In-Reply-To: <439F24B2.1080408@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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 22:26:47 -0000 On 12/14/05 06:44, [LoN]Kamikaze wrote: > 3) > There is one kind of thing I cannot do in /etc/devfs.rules, creating > links. So I am still doing this in /etc/devfs.conf (links don't cause > race conditions anyway, I hope). > > One would think that "link ttyU0 pilot" would simply be translated to > "ln -s /dev/ttyU0 /dev/pilot" which would simply create the link and it > would work as soon as a ttyU0 device (my PDA) is there. But instead it > checks weather the device exists (of course it doesn't since I didn't > press the hotsync button during boot) and omits the creation of the link. Note that while for you it might be sufficient to have a hard coded link from /dev/pilot to /dev/ttyU0, that is not necessarily the case if you have multiple USB serial gadgets. The way I handled it is by using an entry in /etc/usbd.conf: # # Fixup permissions for Palm Handheld ucom devices # (set here and not in devfs.rules since we only want to apply # the change to Palm com ports, not all USB com ports) device "PalmHandheld" devname "ucom[0-9]+" vendor 0x0830 attach "/bin/chmod 0666 /dev/${DEVNAME} ; /bin/ln -s /dev/${DEVNAME} /dev/pilot" detach "rm -f /dev/pilot Having said that, it would be great to be able to create links from devfs.rules - I'd certainly use it for my /dev/cdrom entry! Cheers, /Johny -- Johny Mattsson - Making IT work ,-. ,-. ,-. When all else fails, http://www.earthmagic.org _.' `-' `-' Murphy's Law still works!