NFS Services Administrator Guide for 11i v3 (5900-2572, September 2012)

Following are sample lines from the AutoFS master map on the NFS client, sage. The master map
also includes an entry for the /etc/auto_direct direct map.
# /etc/auto_master file
# local mount-point map name mount options
/- /etc/auto_direct
/nfs/desktop /etc/auto_desktop
The local_parent_directory specified in the master map consists of directories, except the
lowest-level subdirectory in the local directory pathname. For example, if you are mounting a
remote directory on /nfs/apps/draw, /nfs/apps is the local_parent_directory specified
in the master map.
You can configure indirect automounts in the same indirect map only if their
local_parent_directory, as specified in the master map, is the same. For example, indirect
mounts with the local mount-points, /nfs/apps/draw and /nfs/apps/word, can be configured
in the same indirect map.
Following are sample lines from an AutoFS indirect map on the NFS client, sage. The hash (#)
symbol indicates a commented line.
# /etc/auto_desktop file
# local mount-point mount options remote server:directory
draw -nosuid thyme:/export/apps/draw
write -nosuid basil:/export/write
Figure 11 illustrates how AutoFS sets up indirect mounts.
Figure 11 How AutoFS Sets Up NFS Indirect Mounts
Using Environment Variables as Shortcuts in AutoFS Maps
This section describes how to use environment variables as shortcuts in AutoFS maps using an
example. You can create an environment variable by prefixing a dollar ($) to its name, or enclosing
it in braces ({}). You can use an environment variable in a direct or an indirect AutoFS map
anywhere except the first field, which specifies the local mount-point.
IMPORTANT: You cannot use environment variables in the AutoFS master map.
In this example, the NFS server basil, contains subdirectories in its /export/private_files
directory, which are named after the hosts in its network. Every host in the network can use the
same AutoFS map and the same AUTOMOUNTD_OPTIONS definition to mount its private files from
basil.
Using Environment Variables as Shortcuts in AutoFS Maps 63