Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2006 20:27:03 -0800
From:      Gordon Tetlow <gordon@tetlows.org>
To:        Joerg Pernfuss <elessar@bsdforen.de>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: geom_label and devd interaction
Message-ID:  <43F55097.6050806@tetlows.org>
In-Reply-To: <20060211160438.44085869@loki>
References:  <20060211160438.44085869@loki>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43F55097.6050806>