|
|
If you have a map with a lot of subdirectories specified, as in the following indirect map, consider using string substitutions:
#key mount-options locationThe ampersand character (``&'') can be used to substitute the key wherever it appears. Using the ampersand, the previous map would look like this: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 [. . .]
#key mount-options locationIf the name of the server is the same as the key itself, for instance:john willow:/home/willow:& mary willow:/home/willow:& joe willow:/home/willow:& able pine:/export/home:& baker peach:/export/home:& [. . .]
#key mount-options locationthe use of the ampersand would result in:willow willow:/home/willow peach peach:/home/peach pine pine:/home/pine oak oak:/home/oak poplar poplar:/home/poplar [. . .]
#key mount-options locationIf all entries in a map have the same format, you can use the catch-all substitute character, the asterisk (``'');willow &:/home/& peach &:/home/& pine &:/home/& oak &:/home/& poplar &:/home/& [. . .]
#key mount-options locationThe 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.oak &:/export/& poplar &:/export/& &:/home/&