|
Packit |
8480eb |
.\" t
|
|
Packit |
8480eb |
.TH AUTOFS 5 "9 Feb 2014"
|
|
Packit |
8480eb |
.SH NAME
|
|
Packit |
8480eb |
autofs \- Format of the automounter maps
|
|
Packit |
8480eb |
.SH "DESCRIPTION"
|
|
Packit |
8480eb |
The automounter maps are FILE, NIS, NISPLUS or LDAP (including LDAP via SSS)
|
|
Packit |
8480eb |
referred to by the master map of the automounter (see
|
|
Packit |
8480eb |
.BR auto.master (5)).
|
|
Packit |
8480eb |
These maps describe how file systems below the mount point of the map
|
|
Packit |
8480eb |
(given in the master map) are to be mounted. This page describes the
|
|
Packit |
8480eb |
.B sun
|
|
Packit |
8480eb |
map format; if another map format, other than
|
|
Packit |
8480eb |
.B amd ,
|
|
Packit |
8480eb |
is specified (e.g. \fBhesiod\fP),
|
|
Packit |
8480eb |
this documentation does not apply.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Indirect maps, except for the internal hosts map, can be changed on the fly
|
|
Packit |
8480eb |
and the automouter will recognize those changes on the next operation it
|
|
Packit |
8480eb |
performs on that map. Direct maps require a HUP signal be sent to the
|
|
Packit |
8480eb |
daemon to refresh their contents as does the master map.
|
|
Packit |
8480eb |
.SH "SUN FORMAT"
|
|
Packit |
8480eb |
This is a description of the text file format. Other methods of specifying
|
|
Packit |
8480eb |
these files may exist. All empty lines or lines beginning with # are
|
|
Packit |
8480eb |
ignored. The basic format of one line in such maps is:
|
|
Packit |
8480eb |
.P
|
|
Packit |
8480eb |
.BR key\ [ \-options ]\ location
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B key
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
For indirect mounts this is the part of the path name between the mount point
|
|
Packit |
8480eb |
and the path into the filesystem when it is mounted. Usually you can think about the
|
|
Packit |
8480eb |
key as a sub-directory name below the autofs managed mount point.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
For direct mounts this is the full path of each mount point. This map is always
|
|
Packit |
8480eb |
associated with the /- mount point in the master map.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B options
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
Zero or more options may be given. Options can also be given in the
|
|
Packit |
8480eb |
.B auto.master
|
|
Packit |
8480eb |
file in which case both values are cumulative (this is a difference
|
|
Packit |
8480eb |
from SunOS). The options are a list of comma separated options as
|
|
Packit |
8480eb |
customary for the
|
|
Packit |
8480eb |
.BR mount (8)
|
|
Packit |
8480eb |
command.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
There are several special options
|
|
Packit |
8480eb |
.RS
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B \-fstype=
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
is used to specify a filesystem type if the filesystem is not of the default
|
|
Packit |
8480eb |
NFS type. This option is processed by the automounter and not by the mount
|
|
Packit |
8480eb |
command.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B \-strict
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
is used to treat errors when mounting file systems as fatal. This is important when
|
|
Packit |
8480eb |
multiple file systems should be mounted (`multi-mounts'). If this option
|
|
Packit |
8480eb |
is given, no file system is mounted at all if at least one file system
|
|
Packit |
8480eb |
can't be mounted.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B \-use-weight-only
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
is used to make the weight the sole factor in selecting a server when multiple
|
|
Packit |
8480eb |
servers are present in a map entry.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B \-no-use-weight-only
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
can be used to negate the option if it is present in the master map entry
|
|
Packit |
8480eb |
for the map but is not wanted for the given mount.
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B location
|
|
Packit |
8480eb |
The location specifies from where the file system is to be mounted. In the
|
|
Packit |
8480eb |
most cases this will be an NFS volume and the usual notation
|
|
Packit |
8480eb |
.I host:pathname
|
|
Packit |
8480eb |
is used to indicate the remote filesystem and path to be mounted. If
|
|
Packit |
8480eb |
the filesystem to be mounted begins with a / (such as local
|
|
Packit |
8480eb |
.I /dev
|
|
Packit |
8480eb |
entries or smbfs shares) a : needs to be prefixed (e.g.
|
|
Packit |
8480eb |
.IR :/dev/sda1 ).
|
|
Packit |
8480eb |
.SH EXAMPLE
|
|
Packit |
8480eb |
Indirect map:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.0i 3.0i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
kernel \-ro,soft,intr ftp.kernel.org:/pub/linux
|
|
Packit |
8480eb |
boot \-fstype=ext2 :/dev/hda1
|
|
Packit |
8480eb |
windoze \-fstype=smbfs ://windoze/c
|
|
Packit |
8480eb |
removable \-fstype=ext2 :/dev/hdd
|
|
Packit |
8480eb |
cd \-fstype=iso9660,ro :/dev/hdc
|
|
Packit |
8480eb |
floppy \-fstype=auto :/dev/fd0
|
|
Packit |
8480eb |
server \-rw,hard,intr / \-ro myserver.me.org:/ \\
|
|
Packit |
8480eb |
/usr myserver.me.org:/usr \\
|
|
Packit |
8480eb |
/home myserver.me.org:/home
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
In the first line we have a NFS remote mount of the kernel directory on
|
|
Packit |
8480eb |
.IR ftp.kernel.org .
|
|
Packit |
8480eb |
This is mounted read-only. The second line mounts an ext2 volume from a
|
|
Packit |
8480eb |
local ide drive. The third makes a share exported from a Windows
|
|
Packit |
8480eb |
machine available for automounting. The rest should be fairly
|
|
Packit |
8480eb |
self-explanatory. The last entry (the last three lines) is an example
|
|
Packit |
8480eb |
of a multi-map (see below).
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
If you use the automounter for a filesystem without access permissions
|
|
Packit |
8480eb |
(like \fBvfat\fP), users usually can't write on such a filesystem
|
|
Packit |
8480eb |
because it is mounted as user \fBroot\fP.
|
|
Packit |
8480eb |
You can solve this problem by passing the option \fIgid=<gid>\fP,
|
|
Packit |
8480eb |
e.g. \fIgid=floppy\fP. The filesystem is then mounted as group
|
|
Packit |
8480eb |
\fBfloppy\fP instead of \fBroot\fP. Then you can add the users
|
|
Packit |
8480eb |
to this group, and they can write to the filesystem. Here's an
|
|
Packit |
8480eb |
example entry for an autofs map:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.0i 3.0i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
floppy-vfat \-fstype=vfat,sync,gid=floppy,umask=002 :/dev/fd0
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
Direct map:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.0i 3.0i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
/nfs/apps/mozilla bogus:/usr/local/moxill
|
|
Packit |
8480eb |
/nfs/data/budgets tiger:/usr/local/budgets
|
|
Packit |
8480eb |
/tst/sbin bogus:/usr/sbin
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.SH FEATURES
|
|
Packit |
8480eb |
.SS Map Key Substitution
|
|
Packit |
8480eb |
An & character in the
|
|
Packit |
8480eb |
.B location
|
|
Packit |
8480eb |
is expanded to the value of the
|
|
Packit |
8480eb |
.B key
|
|
Packit |
8480eb |
field that matched the line (which probably only makes sense together with
|
|
Packit |
8480eb |
a wildcard key).
|
|
Packit |
8480eb |
.SS Wildcard Key
|
|
Packit |
8480eb |
A map key of * denotes a wild-card entry. This entry is consulted
|
|
Packit |
8480eb |
if the specified key does not exist in the map. A typical wild-card
|
|
Packit |
8480eb |
entry looks like this:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.0i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
* server:/export/home/&
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
The special character '&' will be replaced by the provided key. So,
|
|
Packit |
8480eb |
in the example above, a lookup for the key 'foo' would yield a mount
|
|
Packit |
8480eb |
of server:/export/home/foo.
|
|
Packit |
8480eb |
.SS Variable Substitution
|
|
Packit |
8480eb |
The following special variables will be substituted in the location
|
|
Packit |
8480eb |
field of an automounter map entry if prefixed with $ as customary
|
|
Packit |
8480eb |
from shell scripts (curly braces can be used to separate the field
|
|
Packit |
8480eb |
name):
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.5i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
ARCH Architecture (uname \-m)
|
|
Packit |
8480eb |
CPU Processor Type
|
|
Packit |
8480eb |
HOST Hostname (uname \-n)
|
|
Packit |
8480eb |
OSNAME Operating System (uname \-s)
|
|
Packit |
8480eb |
OSREL Release of OS (uname \-r)
|
|
Packit |
8480eb |
OSVERS Version of OS (uname \-v)
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
autofs provides additional variables that are set based on the
|
|
Packit |
8480eb |
user requesting the mount:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.5i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
USER The user login name
|
|
Packit |
8480eb |
UID The user login ID
|
|
Packit |
8480eb |
GROUP The user group name
|
|
Packit |
8480eb |
GID The user group ID
|
|
Packit |
8480eb |
HOME The user home directory
|
|
Packit |
8480eb |
SHOST Short hostname (domain part removed if present)
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
If a program map is used these standard environment variables will have
|
|
Packit |
8480eb |
a prefix of "AUTOFS_" to prevent interpreted languages like python from
|
|
Packit Service |
1d203b |
being able to load and execute arbitrary code from a user home directory.
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
Additional entries can be defined with the \-Dvariable=Value map-option to
|
|
Packit |
8480eb |
.BR automount (8).
|
|
Packit |
8480eb |
.SS Executable Maps
|
|
Packit |
8480eb |
A map can be marked as executable. A
|
|
Packit |
8480eb |
.B program
|
|
Packit |
8480eb |
map will be called with the key as an argument. It may
|
|
Packit |
8480eb |
return no lines of output if there's an error, or one or more lines
|
|
Packit |
8480eb |
containing a map entry (with \\ quoting line breaks). The map entry
|
|
Packit |
8480eb |
corresponds to what would normally follow a map key.
|
|
Packit |
8480eb |
.P
|
|
Packit |
8480eb |
An executable map can return an error code to indicate the failure in addition
|
|
Packit |
8480eb |
to no output at all. All output sent to stderr is logged into the system
|
|
Packit |
8480eb |
logs.
|
|
Packit |
8480eb |
.SS Multiple Mounts
|
|
Packit |
8480eb |
A
|
|
Packit |
8480eb |
.B multi-mount map
|
|
Packit |
8480eb |
can be used to name multiple filesystems to mount. It takes the form:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.0i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
.BI "key [ \-options ] [[/] location [/relative-mount-point [ \-options ] location...]..."
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.P
|
|
Packit |
8480eb |
This may extend over multiple lines, quoting the line-breaks with \`\\\'.
|
|
Packit |
8480eb |
If present, the per-mountpoint mount-options are appended to the
|
|
Packit |
8480eb |
default mount-options. This behaviour may be overridden by the append_options
|
|
Packit |
8480eb |
configuration setting.
|
|
Packit |
8480eb |
.SS Replicated Server
|
|
Packit |
8480eb |
A mount location can specify multiple hosts for a location, portentially
|
|
Packit |
8480eb |
with a different export path for the same file system. Historically these
|
|
Packit |
8480eb |
different locations are read-only and provide the same replicated file system.
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.5i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
Multiple replicated hosts, same path:
|
|
Packit |
8480eb |
<path> host1,host2,hostn:/path/path
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Multiple hosts, some with same path, some with another
|
|
Packit |
8480eb |
<path> host1,host2:/blah host3:/some/other/path
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Multiple replicated hosts, different (potentially) paths:
|
|
Packit |
8480eb |
<path> host1:/path/pathA host2:/path/pathB
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Mutliple weighted, replicated hosts same path:
|
|
Packit |
8480eb |
<path> host1(5),host2(6),host3(1):/path/path
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Multiple weighted, replicated hosts different (potentially) paths:
|
|
Packit |
8480eb |
<path> host1(3):/path/pathA host2(5):/path/pathB
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Anything else is questionable and unsupported, but these variations will also work:
|
|
Packit |
8480eb |
<path> host1(3),host:/blah
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.SH UNSUPPORTED
|
|
Packit |
8480eb |
This version of the automounter supports direct maps stored in FILE, NIS, NISPLUS
|
|
Packit |
8480eb |
and LDAP (including LDAP via SSS) only.
|
|
Packit |
8480eb |
.P
|
|
Packit |
8480eb |
.SH "AMD FORMAT"
|
|
Packit |
8480eb |
This is a description of the text file format. Other methods of specifying
|
|
Packit |
8480eb |
mount map entries may be required for different map sources. All empty
|
|
Packit |
8480eb |
lines or lines beginning with # are ignored. The basic format of one
|
|
Packit |
8480eb |
line in such maps is:
|
|
Packit |
8480eb |
.P
|
|
Packit |
8480eb |
.BR key\ location-list
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B key
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
A \fBkey\fP is a path (or a single path component alone) that may end
|
|
Packit |
8480eb |
in the wildcard key, "*", or the wildcard key alone and must not begin
|
|
Packit |
8480eb |
with the "/" character.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B location-list
|
|
Packit |
8480eb |
Following the \fBkey\fP is a mount \fBlocation-list\fP.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
A \fBlocation-list\fP list has the following syntax:
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B location[\ location[\ ...\ ]]\ [||\ location[\ location[\ ...\ ]]
|
|
Packit |
8480eb |
.P
|
|
Packit |
8480eb |
A mount \fBlocation-list\fP can use the cut operator, \fB||\fP, to specify
|
|
Packit |
8480eb |
locations that should be tried if none of the locations to the left of it
|
|
Packit |
8480eb |
where selected for a mount attempt.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
A mount \fBlocation\fP consists of an optional colon separated list
|
|
Packit |
8480eb |
of \fBselectors\fP, followed by a colon separated list of \fBoption:=value\fP
|
|
Packit |
8480eb |
pairs.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
The \fBselectors\fP that may be used return a value or boolean result.
|
|
Packit |
8480eb |
Those that return a value may be to used with the comparison
|
|
Packit |
8480eb |
operators \fB==\fP and \fB!=\fP and those that return a boolean result
|
|
Packit |
8480eb |
may be negated with the \fB!\fP.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
For a \fBlocation\fP to be selected for a mount attempt all of its \fBselectors\fP
|
|
Packit |
8480eb |
must evaluate to true. If a \fBlocation\fP is selected for a mount attempt
|
|
Packit |
8480eb |
and succeeds the lookup is completed and returns success. If the mount
|
|
Packit Service |
1d203b |
attempt fails the procedure continues with the next \fBlocation\fP until
|
|
Packit |
8480eb |
they have all been tried.
|
|
Packit |
8480eb |
|
|
Packit Service |
1d203b |
In addition, some \fBselectors\fP take no arguments, some one argument
|
|
Packit |
8480eb |
and others optionally take two arguments.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
The \fBselectors\fP that take no arguments are:
|
|
Packit |
8480eb |
.RS
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B arch
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The machine architecture which, if not set in the confugration, is
|
|
Packit |
8480eb |
obtained using uname(2).
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B karch
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The machine kernel architecture which, if not set in the confugration,
|
|
Packit |
8480eb |
is obtained using uname(2).
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B os
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The operating system name, if not set in the confugration, is obtained
|
|
Packit |
8480eb |
using uname(2).
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B osver
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The operating system version, if not set in the confugration, is obtained
|
|
Packit |
8480eb |
using uname(2).
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B full_os
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The full operating system name, if not set in the confugration this selector
|
|
Packit |
8480eb |
has no value.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B vendor
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The operating system vendor name, if not set in the confugration this selector
|
|
Packit |
8480eb |
has the value "unknown".
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B byte
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The endianness of the hardware.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B cluster
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The name of the local cluster. It has a value only if it is set in the
|
|
Packit |
8480eb |
configuration.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B autodir
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The base path under which external mounts are done if they are needed.
|
|
Packit |
8480eb |
Most mounts are done in place but some can't be and this is the base
|
|
Packit |
8480eb |
path under which those mounts will be done.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B domain
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The local domain name. It is set to the value of the configuration
|
|
Packit |
8480eb |
option \fBsub_domain\fP. If sub_domain is not given in the configuration
|
|
Packit |
8480eb |
it is set to the domain part of the local host name, as given by
|
|
Packit |
8480eb |
gethostname(2).
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B host
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The local host name, without the domain part, as given by gethostname(2).
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B hostd
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The full host name. If \fBsub_domain\fP is given in the configuration
|
|
Packit |
8480eb |
this is set to the contatenation of \fBhost\fP and \fBsub_domain\fP deperated
|
|
Packit |
8480eb |
by a \fB.\fP. If \fBsub_domain\fP is not set in the configuration the value
|
|
Packit |
8480eb |
of \fBdomain\fP is used instead of \fBsub_domain\fP.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B uid
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The numeric value of the uid of the user that first requested the mount. Note
|
|
Packit |
8480eb |
this is usual the same as that used by amd but can be different within autofs.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B gid
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The numeric value of the gid of the user that first requested the mount. Note
|
|
Packit |
8480eb |
this is usual the same as that used by amd but can be different within autofs.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B key
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The string value of the key being looked up.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B map
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The string value of the map name used to lookup \fBkey\fPs.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B path
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The string value of the full path to the mount being requested.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B dollar
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
Evaluates to the string "$".
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
The \fBselectors\fP that take one argument are:
|
|
Packit |
8480eb |
.RS
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B in_network(network) ", " network(network) ", " netnumber(network) ", " wire(network)
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
These \fBselectors\fP are all the same. \fBin_network()\fP is the
|
|
Packit |
8480eb |
preferred usage. The \fBnetwork\fP argument is an address (which may include
|
|
Packit |
8480eb |
a subnet mask) or network name. The function compares \fBnetwork\fP
|
|
Packit |
8480eb |
against each interface and returns true if \fBnetwork\fP belongs to
|
|
Packit |
8480eb |
the network the interface is connected to.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B xhost(hostname)
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBxhost()\fP selector compares \fBhostname\fP to the \fB${host}\fP
|
|
Packit |
8480eb |
and if it doesn't match it attempts to lookup the cannonical name
|
|
Packit |
8480eb |
of \fBhostname\fP and compares it to \f${host}\fP as well.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B exists(filename)
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
Returns true if \fBfilename\fP exits as determined by lstat(2).
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B true()
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
Evaluates to true, the argument is ignored and may be empty.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B false()
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
Evaluates to false, the argument is ignored and may be empty.
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
The \fBselectors\fP that take up to two arguments are:
|
|
Packit |
8480eb |
.RS
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B netgrp(netgroup[,hostname])
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBnetgrp()\fP selector returns true if \fPhostname\fP is a member of
|
|
Packit |
8480eb |
the netgroup \fBnetgroup\fP. If \fBhostname\fP is not given \fB${host}\fP
|
|
Packit |
8480eb |
is used for the comparison.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B netgrpd(netgroup[,hostname])
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBnetgrpd()i\fP selector behaves the same as \fBnetgrp()\fP except
|
|
Packit |
8480eb |
that if \fBhostname\fP is not given \fB${hostd}\fP, the fully qualified
|
|
Packit |
8480eb |
hostname, is used instead of \fB${host}\fP.
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
The \fBoptions\fP that may be used are:
|
|
Packit |
8480eb |
.RS
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B type
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
This is the mount filesystem \fBtype\fP.
|
|
Packit |
8480eb |
It can have a value of
|
|
Packit |
8480eb |
.BR auto ", " link ", " linkx ", " host ", " lofs ", " ext2-4 ", "
|
|
Packit |
8480eb |
.BR xfs ", " nfs ", " nfsl " or " cdfs "."
|
|
Packit |
8480eb |
Other types that are not yet implemented or are not available in autofs are
|
|
Packit |
8480eb |
.BR nfsx ", " lustre ", " jfs ", " program ", " cachefs " and " direct "."
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B maptype
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBmaptype\fP option specifies the type of the map source and can
|
|
Packit |
8480eb |
have a value of \fBfile\fP, \fBnis\fP, \fBnisplus\fP, \fBexec\fP, \fBldap\fP
|
|
Packit |
8480eb |
or \fBhesiod\fP. Map sources either not yet implemented or not available in
|
|
Packit |
8480eb |
autofs are \fBsss\fP, \fBndbm\fP, \fBpasswd\fP and \fBunion\fP.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B fs
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The option \fBfs\fP is used to specify the local filesystem. The meaning of
|
|
Packit |
8480eb |
this option (and whether or not it is used) is dependent on the mount
|
|
Packit |
8480eb |
filesystem \fBtype\fP.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B rhost
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The remote host name for network mount requests.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B rfs
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The remote host filesystem path for network mount requests.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B dev
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
Must resolve to the device file for local device mount
|
|
Packit |
8480eb |
requests.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B sublink
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBsublink\fP option is used to specify a subdirectory
|
|
Packit |
8480eb |
within the mount location to which this entry will point.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B pref
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBpref\fP option is used to specify a prefix that is
|
|
Packit |
8480eb |
prepended to the lookup key before looking up the map entry
|
|
Packit |
8480eb |
key.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B opts
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBopts\fP option is used to specify mount options to be
|
|
Packit |
8480eb |
used for the mount. If a "\fB-\fP" is given it is ignored.
|
|
Packit |
8480eb |
Options that may be used are dependend on the mount filesystem.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B addopts
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBaddopts\fP option is used to specify additional mount
|
|
Packit |
8480eb |
options used in addition to the default mount options for the
|
|
Packit |
8480eb |
mount location.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B remopts
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBaddopts\fP option is used to specify mount options used
|
|
Packit |
8480eb |
instead the options given in \fBopts\fP when the mount location
|
|
Packit |
8480eb |
is on a remote retwork.
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
A number of \fBoptions\fP aren't available or aren't yet implemented
|
|
Packit |
8480eb |
within autofs, these are:
|
|
Packit |
8480eb |
.RS
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B cache
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBcache option\fP isn't used by autofs. The map entry cache is
|
|
Packit |
8480eb |
continually updated and stale entries cleaned on re-load when map
|
|
Packit |
8480eb |
changes are detected so these configuration entries are not used.
|
|
Packit |
8480eb |
The \fBregex\fP map key matching is not implemented and may not be
|
|
Packit |
8480eb |
due to the potential overhead of the full map scans needed on every
|
|
Packit |
8480eb |
key lookup.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B cachedir
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
The \fBcachefs\fP filesystem is not available on Linux, a different
|
|
Packit |
8480eb |
implementation is used for caching network mounted file systems.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B mount ", " unmount ", " umount
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
These \fBoptions\fP are used by the amd \fBprogram\fP mount type which
|
|
Packit |
8480eb |
is not yet implemented.
|
|
Packit |
8480eb |
.TP
|
|
Packit |
8480eb |
.B delay
|
|
Packit |
8480eb |
.br
|
|
Packit |
8480eb |
This \fBoption\fP is not used by the autofs implementation and is ignored.
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.BR
|
|
Packit |
8480eb |
.SH FEATURES
|
|
Packit |
8480eb |
.SS Key Matching
|
|
Packit |
8480eb |
The amd parser key matching is unusual.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
The key string to be looked up is constructed by prepending the prefix, if
|
|
Packit |
8480eb |
there is one.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
The resulting relative path string is matched by first trying the sting
|
|
Packit |
8480eb |
itself. If no match is found the last component of the key string is
|
|
Packit |
8480eb |
replaced with the wilcard match cahracter ("*") and a wildcard match is
|
|
Packit |
8480eb |
attemted. This process continues until a match is found or until the
|
|
Packit |
8480eb |
last match, against the wilcard match key alone, fails to match a map
|
|
Packit |
8480eb |
entry and the key lookup fails.
|
|
Packit |
8480eb |
.SS Macro Usage
|
|
Packit |
8480eb |
Macros are used a lot in the autofs amd implementation.
|
|
Packit |
8480eb |
|
|
Packit |
8480eb |
Many of the option values are set as macro variables corresponding to the
|
|
Packit |
8480eb |
option name during the map entry parse. So they may be used in subsequent
|
|
Packit |
8480eb |
option values. Beware though, the order in which option values is not
|
|
Packit |
8480eb |
necessarily left to right so you may get unexpected results.
|
|
Packit |
8480eb |
.BR
|
|
Packit |
8480eb |
.SH EXAMPLE
|
|
Packit |
8480eb |
Example NFS mount map:
|
|
Packit |
8480eb |
.P
|
|
Packit |
8480eb |
Assuming we have the autofs master map entry:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.0i 3.0i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
/test file,amd:/etc/amd.test
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
And the following map in /etc/amd.test:
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
.RS +.2i
|
|
Packit |
8480eb |
.ta 1.0i 3.0i
|
|
Packit |
8480eb |
.nf
|
|
Packit |
8480eb |
/defaults type:=nfs;rhost:=bilbo
|
|
Packit |
8480eb |
apps rfs:=/autofs
|
|
Packit |
8480eb |
util rhost:=zeus;rfs:=/work/util
|
|
Packit |
8480eb |
local rfs:=/shared;sublink:=local
|
|
Packit |
8480eb |
.fi
|
|
Packit |
8480eb |
.RE
|
|
Packit |
8480eb |
.sp
|
|
Packit |
8480eb |
In the first line we have an NFS remote mount of the exported directory
|
|
Packit |
8480eb |
/autofs from host bilbo which would be mounted on /test/apps. Next
|
|
Packit |
8480eb |
another nfs mount for the exported directory /work/util from host zeus.
|
|
Packit |
8480eb |
This would be mounted on /test/util.
|
|
Packit |
8480eb |
|
|
Packit Service |
1d203b |
Finally, we have an example of the use of the \fBsublink\fP option. In
|
|
Packit |
8480eb |
this case the filesystem bilbo:/shared would be mounted on a path
|
|
Packit |
8480eb |
external the automount directory (under the direcory given by
|
|
Packit |
8480eb |
configuration option auto_dir) and the path /test/local either
|
|
Packit |
8480eb |
symlinked or bind mounted (depending on the setting autofs_use_lofs)
|
|
Packit |
8480eb |
to the "local" subdirectory of the external mount.
|
|
Packit |
8480eb |
.BR
|
|
Packit |
8480eb |
.SH "NOTES"
|
|
Packit |
8480eb |
To be able to use IPv6 within autofs maps the package must be build
|
|
Packit |
8480eb |
to use the libtirpc library for its RPC communications. This is
|
|
Packit |
8480eb |
becuase the glibc RPC implementation doesn't support IPv6 and is
|
|
Packit |
8480eb |
depricated so this is not likely to change.
|
|
Packit |
8480eb |
.BR
|
|
Packit |
8480eb |
.SH "SEE ALSO"
|
|
Packit |
8480eb |
.BR automount (8),
|
|
Packit |
8480eb |
.BR auto.master (5),
|
|
Packit |
8480eb |
.BR autofs (8),
|
|
Packit |
8480eb |
.BR autofs.conf (5),
|
|
Packit |
8480eb |
.BR mount (8),
|
|
Packit |
8480eb |
.BR autofs_ldap_auth.conf (5).
|
|
Packit |
8480eb |
.SH AUTHOR
|
|
Packit |
8480eb |
This manual page was written by Christoph Lameter <chris@waterf.org>,
|
|
Packit |
8480eb |
for the Debian GNU/Linux system. Edited by H. Peter Avian
|
|
Packit |
8480eb |
<hpa@transmeta.com>, Jeremy Fitzhardinge <jeremy@goop.org> and
|
|
Packit |
8480eb |
Ian Kent <raven@themaw.net>.
|