On Sun, Mar 28, 2010 at 09:58:31PM -0700, bri...@aracnet.com wrote: > That seems like a pretty good system. > > I'm unclear what the order of execution is. Does udev create the event > which invokes automount ? > > and if automount is executed first, how is it getting invoked ?
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. 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 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. dt -- Dave Thayer | Whenever you read a good book, it's like the Denver, Colorado USA | author is right there, in the room talking to d...@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-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100330041658.ga3...@thayer-boyle.com