From owner-freebsd-geom@FreeBSD.ORG Fri Feb 17 04:27:04 2006 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2016C16A420 for ; Fri, 17 Feb 2006 04:27:04 +0000 (GMT) (envelope-from gordon@tetlows.org) Received: from spiff.melthusia.org (spiff.melthusia.org [207.67.244.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA50E43D45 for ; Fri, 17 Feb 2006 04:27:03 +0000 (GMT) (envelope-from gordon@tetlows.org) Received: from [192.168.1.56] (cpe-66-91-238-221.san.res.rr.com [66.91.238.221]) (authenticated bits=0) by spiff.melthusia.org (8.12.10/8.12.10) with ESMTP id k1H4QuTJ059385; Thu, 16 Feb 2006 20:26:57 -0800 (PST) (envelope-from gordon@tetlows.org) Message-ID: <43F55097.6050806@tetlows.org> Date: Thu, 16 Feb 2006 20:27:03 -0800 From: Gordon Tetlow User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Joerg Pernfuss References: <20060211160438.44085869@loki> In-Reply-To: <20060211160438.44085869@loki> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: geom_label and devd interaction X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 04:27:04 -0000 Joerg Pernfuss wrote: > Hi, > > I use geom_label for my various usb sticks, cf cards etc and try > to create some sort of automount functionality using the filesystem > labels. > > For example: > umass0: USBest Technology USB Mass Storage Device, rev 2.00/1.00, addr 2 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: <256MB USB2.0FlashDrive A4> Removable Direct Access SCSI-2 device > da0: 1.000MB/s transfers > da0: 250MB (512000 512 byte sectors: 64H 32S/T 250C) > GEOM_LABEL: Label for provider da0s1 is msdosfs/USBSTICK01. > GEOM_LABEL: Label for provider da0s2 is ufs/usbstick01. > > This then gets mangled by devfs.rules: > add path ufs/usbstick01 mode 0600 user elessar group operator > add path msdosfs/USBSTICK01 mode 0600 user elessar group operator > > So far, so good. At this point I'd like devd to honour this rules: > attach 150 { > device-name "ufs/usbstick01"; > # device-name "usbstick01"; > action "su elessar -c 'mount /dev/ufs/usbstick01 \ > /home/elessar/mnt/usbstick01/ufs/'"; > }; > attach 150 { > device-name "msdosfs/USBSTICK01"; > # device-name "USBSTICK01"; > action "su elessar -c 'mount_msdosfs /dev/msdosfs/USBSTICK01 \ > /home/elessar/mnt/usbstick01/msdosfs/'"; > }; > > But, so far, I can't coerce devd into honouring this part of his > configuration. > > Am I missing something or doesn't geom_label create events that are > monitored by devd? > > Thanks for any help. > Joerg > The only obvious thing that jumps out at me is that you are trying to use mount as a user, not root. -gordon