NFS Services Administrator's Guide (B.11.31.02) January 2008

AUTOMOUNT_OPTIONS="-t 720"
3. Enter the following command to start AutoFS.
/sbin/init.d/autofs start
Configuring AutoFS Using the/etc/default/autofs File
You can also use the /etc/default/autofs file to configure your AutoFS environment. The
/etc/default/autofs file contains parameters for the automountd daemon and the
automount command.
Initially, the parameters in the /etc/default/autofs file are commented. You must
uncomment the parameter to make the value for that parameter take effect. Changes made to
the /etc/default/autofs file can be overridden if you modify the AutoFS values from the
command line.
When AutoFS starts up, and if the AUTOMOUNT_OPTIONS variable specifies a master map file
with the -f filename option, AutoFS searches for a file by that name on the local host. It can
also use the Name Service Switch (NSS) to determine which name services are in use. In addition,
it determines the master maps that are available from those name services.
If the AUTOMOUNT_OPTIONS variable does not specify the -f filename option, AutoFS consults
the NSS configuration, to determine where to search for the AutoFS master map.
For more information on configuring the NSS, see nsswitch.conf (4) and automount(1M) .
To configure AutoFS using the /etc/default/autofs file, follow these steps:
1. Log in as superuser.
2. Edit the /etc/default/autofs file. For instance, to change the default time for which a
filesystem remains mounted when not in use, modify the AUTOMOUNT_TIMEOUT variable,
as follows:
AUTOMOUNT_TIMEOUT=720
For the list of parameters supported in the /etc/default/autofs file, see autofs(1M).
NOTE: Values modified using the /etc/defualt/autofs are updated when the command
or daemon is started. This update is made irrespective of the way the command or daemon is
started, Autofs startup script or command-line.
Enabling AutoFS
To enable AutoFS, follow these steps:
1. In the /etc/rc.config.d/nfsconf file, set the value of AUTOFS variables to 1, as follows:
AUTOFS=1
2. Configure AutoFS using either the /etc/rc.config.d/nfsconf or the
/etc/default/autofs configuration files. If you use a local file as the master map, ensure
that the AUTO_MASTER variable in /etc/rc.config.d/nfsconf is set to the name of the
master map, as follows:
AUTO_MASTER=/etc/auto_master
If the -f option is not specified for the automount command then the Name Service Switch
(NSS) is used to get the master map. If the master map is not found in any of the backends,
then it tries the default master map name/etc/auto_master. If the -f option is specified
for the automount command, then it uses that file irrespective of what the backend says.
However, if the file is not found, then it will try the /etc/auto_master file. If you use an
NIS AutoFS master map, ensure that -f $AUTO_MASTER is not present in the
AUTOMOUNT_OPTIONS variable.
3. To run the AutoFS startup script, enter the following command:
64 Configuring and Administering AutoFS