linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akkana <akkana@shallowsky.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Howto automatically mount multiple usb-storage devices?
Date: Sat, 24 Nov 2001 03:26:24 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-100657238421159@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-100651558721370@msgid-missing>

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

      parent reply	other threads:[~2001-11-24  3:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-23 11:37 Howto automatically mount multiple usb-storage devices? erik.niessen
2001-11-23 12:26 ` Oliver Neukum
2001-11-24  3:26 ` Akkana [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-100657238421159@msgid-missing \
    --to=akkana@shallowsky.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).