Solved autofs -media documentation/example



Reaction score: 6
Messages: 47

autofs is wonderful. Kudus to Edward Tomasz Napierała et al.

I would like some help understanding how to use the -media special map. This is for a desktop with a multitude of removable media devices. I have been able to find:
  • an example in /etc/auto_master with a tantalizing instruction to enable the automount -c example found in /etc/devd.conf (pretty clear the devd.conf example block needs to be tweaked somehow?).
  • a brief reference to -media in auto_master(5)() in the SPECIAL MAPS section which suggests that this is, indeed, the option I want.
  • grep'ing the contents of /usr/src/usr.sbin/autofs for the string "media" only hits on the man source.
  • the -media map does not appear to exist in autofs implementations for other OS'en where I have checked (e.g. OSX, Arch, Ubuntu)
Enabling the example as-is does probe the floppy (can't find a disk to test..) when accessing /media; but appears to ignore any other media (CD's and/or thumb drives).


Active Member

Reaction score: 74
Messages: 228

Regarding the devd.conf change: the block in question doesn't need to be changed, it just needs to be moved upwards, before the line that says "/* EXAMPLES TO END OF FILE".