|
|
The major difference between the contents of a direct and indirect map is that a direct map is complete of itself, whereas an indirect map requires additional information from the master map or the automount command line. This additional information is the pathname at which to create a virtual directory under which automount links the indirect map keys. The following subsections provide examples of indirect and direct maps.
The syntax for an indirect map is:
key [ mount_options ] location [ location ] . . .
A line whose first character is ``#'' is treated as a comment and everything that follows until the end of the line is ignored. A backslash at the end of a line permits splitting long lines into shorter ones. For details on this syntax see ``About automount maps''.
The following is a sample indirect map called /etc/auto.doc, based on ``An example of indirect mounting using automount''.
spellers -ro madrid:/doc.stuff/spellers roff -ro oslo:/doc/bin/roffClearly, the key in the indirect map requires more information, specifically the actual location of the mount points, spellers and roff. The appropriate level of qualification can be provided by either:
/doc_tools /etc/auto.doc -ro
The automount monitored directory /doc_tools is a virtual directory that may only contain automounted directories. If a /doc_tools directory existed before the mount, all files and directories under the pre-existing /doc_tools are hidden while the virtual /doc_tools exists.
The syntax for a direct map is:
key [ mount_options ] location [ location ] . . .
A line whose first character is ``#'' is treated as a comment and everything that follows until the end of the line is ignored. A backslash at the end of a line permits splitting long lines into shorter ones. For details on this syntax see ``About automount maps''.
The following is a sample direct automount map:
/usr/man -ro,soft london:/usr/man /usr/spool/news -ro,soft prague:/usr/spool/newsThe first entry is the direct mount entry for the mount illustrated in ``An example of direct mounting using automount''. See the description near the figure.
The second entry mounts the filesystem /usr/spool/news from the server prague. automount creates the directories /usr, /usr/spool, and /usr/spool/news if they do not already exist. If /usr/spool/news does exist and is not empty, the mounted filesystem hides the local existing filesystem.
See also: