| United States-English |
|
|
|
![]() |
NFS Services Administrator’s Guide: HP-UX 11i version 3 > Chapter 3 Configuring and Administering AutoFSUsing 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.
In this example `the NFS serverbasil, 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. When AutoFS starts up on the host sage, it assigns the value sage to the HOST variable. When you request access to the local /private_files directory on sage, AutoFS mounts /export/private_files/sage from basil. To use environment variables as shortcuts in direct and indirect maps, follow these steps:
You can use any environment variable that is set to a value in an AutoFS map. If you do not set the variable either with the -D option in /etc/rc.config.d/nfsconf file or by using the /etc/default/autofs file, AutoFS uses the current value of the environment variable on the local host. For information on some of the pre-defined environment variables, see automount(1M). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||