autofs fun

I finally decided to take a few moments and setup autofs. I thought about using supermount but that appears to have fallen much out of favor. At the moment it’s still maintained by Con Kolivas though.

I based on my configuration on a nice, green guide I found.

faith:~# cat /etc/auto.master
/var/autofs/media       /etc/auto.media --timeout=1
.
faith:~# cat /etc/auto.media
#auto.media
cdrom           -fstype=iso9660,ro,sync,nodev,nosuid            :/dev/hdc
floppy          -fstype=auto,sync,nodev,nosuid                  :/dev/fd0
flash           -fstype=vfat,umask=000                          :/dev/sdb1
.

It’s a functional solution, but not entirely transparent. You can’t tab complete through to the path for each device, since autofs only creates it once you attempt to access the directory. If you instead try to access a symlink to the path, it shows up as a broken symlink unless there is media in the device. Then, of course, it gets mounted and the symlink resolves properly.

Close enough, though.