HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
a
automount(1M) automount(1M)
Map Key Substitution
The ampersand (&) character is expanded to the value of the key field for the entry in which it occurs. In
this case:
amy rowboatserver:/home/&
the & expands to amy.
Wildcard Key
The asterisk (*) character, when supplied as the key field, is recognized as the catch-all entry. Such an
entry will match any key not previously matched. For instance, if the following entry appeared in the
indirect map for
/config:
* &:/export/config/&
it would allow automatic mounts in /config of any remote file system whose location could be specified
as:
hostname
:/export/config/
hostname
Variable Substitution
Client specific variables can be used within an
automount map. For instance, if
$HOST appeared within
a map,
automount would expand it to its current value for the client’s host name. Supported variables
are:
CPU The processor type (only available with Enhanced AutoFS). The possible values are: IA64,
PA10, PA11, PA20.
HOST The output of uname -n. The host name. For example, rowboat.
OSNAME The output of uname -s. The OS name. For example, HP-UX.
OSREL The output of uname -r. The OS release name. For example,
B.11.00.
OSVERS The output of uname -v. The OS version. For example, C.
If a reference needs to be protected from neighboring characters, you can surround the variable name with
braces (
{}).
Multiple Mounts
A multiple mount entry takes the form:
key [-mount-options][[mountpoint][
-mount-options] location...]...
The initial
/[mountpoint] is optional for the first mount and mandatory for all subsequent mounts. The
optional mountpoint is taken as a pathname relative to the directory named by key.Ifmountpoint is omit-
ted in the first occurrence, a mountpoint of
/ (root) is implied.
Given an entry in the indirect map for /src:
beta -ro \
/ svr1,svr2:/export/src/beta \
/1.0 svr1,svr2:/export/src/beta/1.0 \
/1.0/man svr1,svr2:/export/src/beta/1.0/man
All offsets must already exist on the server under beta. automount automatically mounts
/src/beta, /src/beta/1.0, and /src/beta/1.0/man
, as needed, from either svr1 or svr2,
whichever host is nearest and responds first.
The
autofs mount points must not be hierarchically related. automount does not allow an autofs
mount point to be created within another autofs mount.
Other Filesystem Types
The automounter assumes NFS mounts as a default filesystem type. Other filesystem types can be
described using the -fstype mount option. Other mount options specific to this filesystem type can be
combined with the -fstype option. The location field must contain information specific to the filesystem
type. If the location field begins with a slash, a colon character must be prepended, for instance, to mount
a CD filesystem:
cdrom -fstype=hsfs,ro :/dev/sr0
HP-UX 11i Version 1: September 2005 − 3 − Hewlett-Packard Company Section 1M−−91