If you have a map with many subdirectories specified, as in the following, consider using string substitutions.
john willow:/home/john mary willow:/home/mary joe willow:/home/joe able pine:/export/able baker peach:/export/baker |
You can use the ampersand character (&) to substitute the key wherever the key appears. If you use the ampersand, the previous map changes to the following:
john willow:/home/& mary willow:/home/& joe willow:/home/& able pine:/export/& baker peach:/export/& |
You could also use key substitutions in a direct map, in situations such as the following:
/usr/man willow,cedar,poplar:/usr/man |
You can also simplify the entry further as follows:
/usr/man willow,cedar,poplar:& |
Notice that the ampersand substitution uses the whole key string. Therefore, if the key in a direct map starts with a / (as it should), the slash is included in the substitution. Consequently, for example, you could not do the following:
/progs &1,&2,&3:/export/src/progs |
The reason is that autofs would interpret the example as the following:
/progs /progs1,/progs2,/progs3:/export/src/progs |