From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:11:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FE6DBAF; Thu, 21 May 2015 13:11:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D6171B32; Thu, 21 May 2015 13:11:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LDBnwA092013; Thu, 21 May 2015 13:11:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDBnjA092012; Thu, 21 May 2015 13:11:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211311.t4LDBnjA092012@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283225 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:11:49 -0000 Author: trasz Date: Thu May 21 13:11:48 2015 New Revision: 283225 URL: https://svnweb.freebsd.org/changeset/base/283225 Log: MFC r276883: Improve documentation for autofs variables and executable maps; also some markup fixes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:10:08 2015 (r283224) +++ stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:11:48 2015 (r283225) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2014 +.Dd January 9, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -172,6 +172,42 @@ This is typically used with wildcards, l .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: +.Pp +.Bl -tag -width "-OSNAME" -compact +.It Li ARCH +Expands to the output of +.Li "uname -p" . +.It Li CPU +Same as ARCH. +.It Li HOST +Expands to the output of +.Li "uname -n" . +.It Li OSNAME +Expands to the output of +.Li "uname -s" . +.It Li OSREL +Expands to the output of +.Li "uname -r" . +.It Li OSVERS +Expands to the output of +.Li "uname -v" . +.El +.Pp +Additional variables can be defined with the +.Fl D +option of +.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 @@ Query the remote NFS server and map expo 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 not present until the first access, +when they are automatically created. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. @@ -227,13 +265,27 @@ Prevent .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 +.Pa special_foo , +to the +.Pa /etc/autofs/ +directory. .Sh EXECUTABLE MAPS If the map file specified in .Nm -has execute bit set, the +has the execute bit set, .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 characters. +Otherwise, the executable will be called with a key name as +a command line argument. +Output from the executable is expected to be the entry for that key, +not including the key itself. .Sh INDIRECT VERSUS DIRECT MAPS Indirect maps are referred to in .Nm @@ -300,6 +352,9 @@ It can be symlinked to The default location of the .Pa auto_master file. +.It Pa /etc/autofs/ +Directory containing shell scripts to implement special maps and directory +services. .El .Sh SEE ALSO .Xr autofs 5 ,