DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using the NFS automounter

Using environment variables

You can use the value of an environment variable by prefixing a dollar sign ($) to its name. Braces can also be used to delimit the name of the variable from appended characters.

The environment variables can be inherited from the environment or defined explicitly with the -D option on the command line. For example, if you want each client to mount client-specific files in the network in a replicated format, you could create a specific map for each client according to its name, so that the relevant line for host oak would be:

   /mystuff   cypress,ivy,balsa:/export/hostfiles/oak
and for willow:
   /mystuff   cypress,ivy,balsa:/export/hostfiles/willow
This scheme is viable within a small network, but maintaining this kind of host-specific map across a large network usually isn't feasible. The solution in this case would be to invoke the automounter with a command line similar to the following:

automount -D HOST=`uname -n` ...

and have the entry in the direct map read:

   /mystuff   cypress,ivy,balsa:/export/hostfiles/$HOST
Now each host would find its own files in the mystuff directory, and the task of centrally administering and distributing the maps becomes easier.
Next topic: Using weighting factors
Previous topic: Using substitutions

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005