Executable Autofs Maps
You can create an autofs map that executes some commands to generate the autofs
mount points. Executable autofs
maps are useful if you need to be able to create the autofs structure from a database or a flat file. The disadvantage to using an executable map is that the map needs to be installed on each host. An executable map cannot be included in NIS and LDAP name services.
The executable map must have an entry in the auto_master
file.
/execute auto_execute
The following example shows a sample executable map:
#!/bin/ksh # # executable map for autofs # case $1 in src) echo '-nosuid,hard bee:/export1' ;; esac
For this example to work, the file must be installed as /etc/auto_execute
and must have the executable bit set. Set permissions to 744
. Under these circumstances, running the following command causes the /export1
file system from bee
to be mounted:
# ls /execute/src