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

Using substitutions

If you have a map with a lot of subdirectories specified, as in the following indirect map, consider using string substitutions:

   #key      mount-options   location
   

john willow:/home/willow:john mary willow:/home/willow:mary joe willow:/home/willow:joe able pine:/export/home:able baker peach:/export/home:baker [. . .]

The ampersand character (``&'') can be used to substitute the key wherever it appears. Using the ampersand, the previous map would look like this:
   #key      mount-options   location
   

john willow:/home/willow:& mary willow:/home/willow:& joe willow:/home/willow:& able pine:/export/home:& baker peach:/export/home:& [. . .]

If the name of the server is the same as the key itself, for instance:
   #key      mount-options   location
   

willow willow:/home/willow peach peach:/home/peach pine pine:/home/pine oak oak:/home/oak poplar poplar:/home/poplar [. . .]

the use of the ampersand would result in:
   #key      mount-options   location
   

willow &:/home/& peach &:/home/& pine &:/home/& oak &:/home/& poplar &:/home/& [. . .]

If all entries in a map have the same format, you can use the catch-all substitute character, the asterisk (``*'');
   #key      mount-options   location
   

oak &:/export/& poplar &:/export/& * &:/home/&

The asterisk catch-all key (*) matches on everything that reaches this point in the map. Once the automounter reads the catch-all key, it does not continue to read the map.
Next topic: Using environment variables
Previous topic: Example: specifying subdirectories

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