From: "Brian T. Brunner" <brian.t.brunner@gai-tronics.com>
To: linux-hotplug@vger.kernel.org
Subject: objective: automount a thumbdrive when it is inserted, autodetect
Date: Tue, 11 Nov 2003 17:46:48 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106857302419449@msgid-missing> (raw)
I run shrike (RH9, linux kernel 2.4.20-8).
I insert a thumb drive (Kanguru Microdrive 128MB)
that lsusb says is 0d7d/0120 Apacer.
Currently I poll for the device being physically present using
system("grep -q usb-storage /proc/bus/usb/devices)".
This seems to be a reliable indicator of whether the device is inserted.
When this returns success, then mount("/dev/sda1","/mnt/thumbdrive") and
system("cat bigfile | bzip2 > /mnt/thumbdrive/smallfile") to compress
bigfile onto the thumbdrive. There may be several bigfiles.
Then I umount("/mnt/thumbdrive") and wait for the periodic grep
of usb-storage in /proc/bus/usb/devices to indicate that the thumbdrive
went away, and then got plugged in again.
This all works fine the first time, sometimes the second.
By time the 5th attempt is made, /var/log/messages begins to get
"kernel: usb_control/bulk_msg: timeout"
messages, and "time lsusb" takes 15 seconds to run.
The file copy take proportionately longer, but completes.
devlabel is not employed (I tried it, it created a symlink and
did nothing else; no automount ever occurred).
I'll happily RTFM, which part? Or is there a clue about
the cause of the timeout?
Brian Brunner
brian.t.brunner@gai-tronics.com
(610)796-5838
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept
for the presence of computer viruses.
www.hubbell.com - Hubbell Incorporated
**********************************************************************
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
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
reply other threads:[~2003-11-11 17:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-106857302419449@msgid-missing \
--to=brian.t.brunner@gai-tronics.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).