I'm interested in the automounter. I would be very nice to have my jumpdrive mount when I plug it in. Also, if anybody knows udev...
I managed to just set up automounting on my gentoo box, via some udev rules, HAL, D-BUS and a neat little app called ivman. Ivman will detect when new devices are plugged in and create a new entry in fstab if there isn't already an acceptable one (it'll remove the entry when the device is not connected); it can also be set up to do some more interesting things, such as integration to say start up your burning program when a blank CD-R is put in, etc. Using some udev rules (this is a great reference http://www.reactivated.net/writing_udev_rules.html) isn't *that* hard. You can use the program udevinfo to find out information about your plugged in devices to write appropriate rules. For example, I have a rule to link the device to a node /dev/nikon for my nikon camera, whenever it is plugged in. Then, I have an entry in /etc/fstab to mount /dev/nikon at /media/nikon, and lvman takes care of that (detects when that node is linked, reads fstab and mounts appropriately - if I didn't have that entry in fstab it would create one to mount at like /media/usbdevice01 or something). It even (usually) unmounts the device without issue (figuring out why it doesn't always). Since the serial number for each device is specific, my rule just uses that, so it looks like: SYSFS{serial}="SERIAL OF MY NIKON", NAME="%k", SYMLINK="nikon" to link node /dev/nikon to my camera. I had to use mknod to create that node initially (just a simply character device, I believe, can't remember the major/minor numbers off the top of my head). Of course you need to make sure you have hotplug installed and enabled in your kernel, as well as usb_storage and the SCSI modules (needed for the usb-storage module to work, according to kernel documentation). -- Carlton C. Stedman II, sageman@wpi.edu "To iterate is human, to recurse, divine." -- L. Peter Deutch
participants (1)
-
Carlton C. Stedman II