From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akkana Date: Sat, 24 Nov 2001 03:26:24 +0000 Subject: Re: Howto automatically mount multiple usb-storage devices? Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org erik.niessen@philips.com writes: > My problem is very simple I have a few usb-storage devices and I would like to > connect them randomly. After connecting the device it must be mounted, but I > don't know the name of the device on forehand? I've gotten the impression that support for this sort of thing was coming, but isn't there yet. So for my simple needs (read files from one of two USB devices that might be connected at any given time), I wrote a little perl script to look in /proc/scsi/usb-storage* and figure out which device was mounted on which id. It's nothing special and currently only understands the two devices I have and the directories where I mount them, but you could easily modify it to do whatever you needed if you only have a few devices. You're welcome to it: http://www.shallowsky.com/software/mountpix.pl The downside is that I can't use fstab entries (because one of the devices is read-only while the other isn't), so I have to mount the device explicitly and therefore the script has to run as root. I run it with sudo and added it under my name in /etc/sudoers. Hotplugging to known locations, so we could hook up to fstab, would be a lot better. ...Akkana _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel