Automounting usb flash devices

Howdy,

I'm looking to find the current best practice on automounting usb flash devices when not using a DE like Gnome or KDE - this is a server. In my many years of working with FreeBSD I've never touched amd and these days I'm not even sure that's the best choice. I see there's "hald" which seems to be associated more with Gnome or KDE, perhaps that's the right answer. Anyhow, this is what I'm looking for:

-ability to identify a specific usb flash device and mount it, ignoring any other devices that might get plugged in
-when mounted, be able to trigger a script
-when unmounted (by the script), don't re-mount it for any crazy reason

Any pointers?
 
spork said:
I see there's "hald" which seems to be associated more with Gnome or KDE, perhaps that's the right answer.
Not anymore it isn't, and it probably never was ;)
Both the new Gnome and XFCE have dropped automounting using HAL and implemented it using udev.
Which basically means automounting doesn't work on FreeBSD with the latest Gnome and XFCE :(
 
wblock: Thanks! That will suit my needs perfectly.

SirDice: What a shame. That kind of stuff really bugs me. Inserting Linuxisms into projects that need not be linux-only seems hypocritical at best given how many linux evangelists are inclined to jump all over MS and Apple for being "proprietary".
 
Spork, take a look at my xmountd script, in particular the /tmp/.xmountd/mountable file that it maintains. It should be trivial to write another shell script that parses that file looking for file systems to mount/umount. :)
 
Back
Top