NFS Services Administrator's Guide
Configuring and Administering NFS
Configuring and Administering the NFS Automounter
Chapter 278
The example shown above assumes that NFS server sage has
subdirectories in its /export/private_files directory that are named
after the hosts in its network. Every host in the network can use the
same automounter map and the same AUTO_OPTIONS definition to mount
its private files from server sage.
For example, when the automounter starts up on host basil, it assigns
the value basil to the HOST variable. Then, when someone requests
access to the local /private_files directory on basil, the automounter
mounts /export/private_files/basil from server sage.
Any environment variable that is set to a value may be used in an
automounter map. If you do not set the variable with the -D option in
/etc/rc.config.d/nfsconf, the automounter uses the current value of
the environment variable on the local host.
To Use Wildcard Characters as Shortcuts in
Automounter Maps
1. Use the asterisk (*) in an indirect map as a wildcard character to
represent the local subdirectory, when you want the local
subdirectory to be the same as the remote system name or the
remote subdirectory.
2. Use the ampersand (&) in a direct or indirect map as the remote
system name or the remote subdirectory. Whatever is in the local
directory name field will replace the ampersand. If you have used an
asterisk to represent the local subdirectory, whatever replaces the
asterisk (*) in the local subdirectory field also replaces the
ampersand (&) in the remote system name or remote subdirectory
field.
You cannot use the asterisk (*) wildcard in a direct map.
The following example automounts users’ home directories. The home
directories are physically located on NFS server basil, under the remote
directory /home. On the local NFS client, the home directories will also
be mounted under /home.
Following is the line from the automounter master map
/etc/auto_master that lists the indirect map /etc/auto_home.