From: Wout Mertens <wmertens@cisco.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Working on a usb-storage hotplug script
Date: Thu, 11 Dec 2003 15:37:45 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-107115744704309@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-107006883203516@msgid-missing>
Yesterday at 20:49, Olaf Hering sat down and wrote:
> On Wed, Dec 10, Wout Mertens wrote:
>
> > Yesterday at 17:09, Olaf Hering ponderously produced:
> >
> > > On Tue, Dec 09, Wout Mertens wrote:
> > >
> > > > Comments?
> > >
> > > forget 2.4, work on 2.6. 2.6 will give you a block event if there is
> > > something of interrest.
> >
> > Well, you're right. I just created a hotplug script that will automount
> > all block devices that get attached. I use this behaviour to use a USB
> > key as a token for connecting to a VNC session from a thin client.
> >
> > It's way cleaner than the 2.4 version...
> >
> > Here's the script, comments?
>
> to make it more generic, use /proc/self/mounts and sed instead of tr.
Sure :) Here are the changed lines:
====================
done < /proc/self/mounts
done < /proc/self/mounts
echo $1 | sed 's/[ /?*\"<>]/_/g'
set `echo $DEVPATH | sed 's/\// /g'`
set `echo $PASSWD | sed 's/:/ /g'`
====================
Playing with it, I see that 2.6 is very robust, and the only problem is
that when you mount something as "sync", it doesn't sync the directory
entry until after you type "sync". It does write all the data first
though. Sigh. This is where supermount_ng comes in.
I realize that the cleaner way would be to rewrite fstab and let
KDE/Gnome help the user with mounting/unmounting. But that won't help
for USB login tokens...
Wout.
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
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
prev parent reply other threads:[~2003-12-11 15:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-29 1:19 Working on a usb-storage hotplug script Martin
2003-11-29 12:33 ` reflex
2003-11-29 14:06 ` Oliver Neukum
2003-11-29 18:05 ` Marco d'Itri
2003-11-30 11:19 ` reflex
2003-11-30 19:38 ` Greg KH
2003-12-09 9:05 ` Wout Mertens
2003-12-09 16:09 ` Olaf Hering
2003-12-09 16:24 ` Greg KH
2003-12-10 19:29 ` Wout Mertens
2003-12-10 19:41 ` Wout Mertens
2003-12-10 19:49 ` Olaf Hering
2003-12-11 15:37 ` Wout Mertens [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-107115744704309@msgid-missing \
--to=wmertens@cisco.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).