Prev: Repartitioning a USB external HD. Need help removing existing partition (private question)
Next: NIS user member of plugdev, gnome-mount of flash drive raises error [SOLVED]
From: briand on 30 Mar 2010 01:30 On Mon, 29 Mar 2010 22:16:59 -0600 Dave Thayer <debian1008818.dmthayer(a)recursor.net> wrote: > Autofs starts up the automount daemons at bootup. One is configured to > use the map file /etc/auto.removable. This is done by adding the > following line to /etc/auto.master: > > /media/auto /etc/auto.removable --timeout=2 --ghost > > This is a very important detail which I inadvertantly left out of my > previoust post. It tells automount to create a directory under > /media/auto for each mapping in /etc/auto.removable. My apologies for > neglecting to mention it earlier. thanks for clarifying. > > When a usb or firewire device is plugged-in or unplugged, the rule > file I attached earlier checks if it it is a filesystem, and if so the rule file is a udev rule file, right ? Doesn't this mean that in the case of a specific device, you can simply match the device exactly and then mount it to a static mount point ? > runs the script /usr/local/bin/removable_drive_handler which checks if > the event is an add or remove, and then adds or removes lines from the > autofs map file /etc/auto.removable. It then sends a SIGHUP signal to > the automount process causing it to reload the > new /etc/auto.removable. > > Some devices such as my ipod generate spurious device names during > plugging, so there's a delayed test of the mountpoint, and if it's > bogus autofs will remove it. > > This script contains more than its fair share of crockery, and could > use improvement, but it works for me. > This seems like one of those problems which should have been solved a long time ago. t's not clear to me why the gnome volume manager doesn't have a command-line backend, as a separate package from what the gui does. Rolling this stuff into something like nautilus is even worse. Thanks again. Brian -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/20100329222318.6646fd8d(a)windy.deldotd.com
From: Dave Thayer on 1 Apr 2010 01:30 On Mon, Mar 29, 2010 at 10:23:18PM -0700, briand(a)aracnet.com wrote: > > the rule file is a udev rule file, right ? Correct. > Doesn't this mean that in the case of a specific device, you can simply > match the device exactly and then mount it to a static mount point ? Yes, this is the most straightforward approach, for each USB MSD you can write a udev rule and a correspoding fstab entry (or automount mapping). A good resource for this is Daniel Drake's writeup at <http://www.reactivated.net/writing_udev_rules.html>. I did this for a long time but grew tired of having to edit conf files every time I got a new toy. Hence, the label-based automount script. > This seems like one of those problems which should have been solved a > long time ago. Gnome and KDE seem to do a pretty good job of handling this, as long as you are willing to play within the bounds of the DE world. I'm kind of a retro-grouch, so these things don't do me a whole lot of good. -- Dave Thayer | Whenever you read a good book, it's like the Denver, Colorado USA | author is right there, in the room talking to dave(a)thayer-boyle.com | you, which is why I don't like to read | good books. - Jack Handey "Deep Thoughts" -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/20100401050306.GA26545(a)thayer-boyle.com
From: briand on 1 Apr 2010 09:40
On Wed, 31 Mar 2010 23:03:06 -0600 Dave Thayer <debian1009022.dmthayer(a)recursor.net> wrote: > On Mon, Mar 29, 2010 at 10:23:18PM -0700, briand(a)aracnet.com wrote: > > > > the rule file is a udev rule file, right ? > > Correct. > > > Doesn't this mean that in the case of a specific device, you can > > simply match the device exactly and then mount it to a static mount > > point ? > > Yes, this is the most straightforward approach, for each USB MSD you > can write a udev rule and a correspoding fstab entry (or automount > mapping). A good resource for this is Daniel Drake's writeup at > <http://www.reactivated.net/writing_udev_rules.html>. > very useful link ! > Gnome and KDE seem to do a pretty good job of handling this, as long > as you are willing to play within the bounds of the DE world. I'm kind > of a retro-grouch, so these things don't do me a whole lot of good. > Me too, so you're allowed to stay on my lawn ! Thanks, Brian -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/20100401063503.3d57d8ea(a)windy.deldotd.com |