[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: handling removable media without gnome-volume-manager



On Mon, 29 Mar 2010 22:16:59 -0600
Dave Thayer <debian1008818.dmthayer@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


Reply to: