To turn off an AutoFS map using the -null map, perform the following steps:
Add a line with the following syntax to the AutoFS master
map:
If AutoFS is running, and you want to force it to
reread its maps, issue the following command on each client that
will use the map:
The -null option turns off the map that is mounted on local_directory. For example, if the NIS auto_master map mounts the auto_home map on /home, and you include the following line in your local /etc/auto_master file, the auto_home NIS map is not used on your system:
The -null option is useful for turning off NIS AutoFS maps
that do not apply to your host.
You can also replace NIS maps with local maps; see the following example
from /etc/auto_master:
As AutoFS reads the local /etc/auto_master file before the auto_master NIS map, this entry causes AutoFS to look for
mount information in the local file, /etc/auto_ourhome, instead of the auto_home NIS map.
To use a local AutoFS master map, make sure the AUTOMOUNT_OPTIONS variable in /etc/rc.config.d/nfsconf includes the -f $AUTO_MASTER string. In addition, make sure the AUTO_MASTER variable is set to the name of your local AutoFS
master map file.
For more information, see the automount(1M) man page.