Index: usr.sbin/autofs/auto_master.5 =================================================================== --- usr.sbin/autofs/auto_master.5 +++ usr.sbin/autofs/auto_master.5 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2014 +.Dd January 01, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -172,6 +172,42 @@ .Li * 192.168.1.1:/share/& .Ed .Pp +The +.Ar location +field may contain references to variables, like: +.Bd -literal -offset indent +.Li sys 192.168.1.1:/sys/${OSNAME} +.Ed +.Pp +Defined variables are: +.Bl -tag -width "-OSNAME" -compact +.Pp +.It Li ARCH +Expanded to the output of +.Cm "uname -p". +.It Li CPU +Same as ARCH. +.It Li HOST +Expanded to the output of +.Cm "uname -n". +.It Li OSNAME +Expanded to the output of +.Cm "uname -s". +.It Li OSREL +Expanded to the output of +.Cm "uname -r". +.It Li OSVERS +Expanded to the output of +.Cm "uname -v". +.El +.Pp +Additional variables can be defined by using the +.Fl D +option to +.Xr automount 8 +and +.Xr automountd 8 . +.Pp To pass a location that begins with .Li / , prefix it with a colon. @@ -217,8 +253,10 @@ This map is traditionally mounted on .Pa /net . Access to files on a remote NFS server is provided through the -.Pa /net/nfs-server-ip/share-name/ +.Pf /net/ Ar nfs-server-ip Ns / Ns Ar share-name Ns/ directory without any additional configuration. +Directories for individual NFS servers are created on first access; +they are not visible until then. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. @@ -227,6 +265,11 @@ .Xr automountd 8 from mounting anything on the mountpoint. .El +.Pp +It is possible to add custom special maps by adding them, as executable +maps named "special_foo", to the +.Pa /etc/autofs/ +directory. .Sh EXECUTABLE MAPS If the map file specified in .Nm @@ -234,6 +277,12 @@ .Xr automountd 8 will execute it and parse the standard output instead of parsing the file contents. +When called without command line arguments, the executable is +expected to output a list of available map keys, separated by +newline character. +Otherwise, the executable will be called with a key name as +a command line argument, and is expected to output a single map +entry for that key, without the key itself. .Sh INDIRECT VERSUS DIRECT MAPS Indirect maps are referred to in .Nm @@ -300,6 +349,9 @@ The default location of the .Pa auto_master file. +.It Pa /etc/autofs/ +Directory containing shell scripts to implement special maps and directory +service. .El .Sh SEE ALSO .Xr autofs 5 ,