diff options
author | trasz <trasz@FreeBSD.org> | 2014-08-31 21:18:23 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-08-31 21:18:23 +0000 |
commit | e8d76f86d25e64bdb4a9ab0b15c509c07491724a (patch) | |
tree | 3eebe0ef20c0ab7543612cca9aa64d87a222a4ed /etc/autofs/special_hosts | |
parent | 0ca40bff6c5041cdf647ca146893c61a26796c76 (diff) | |
download | FreeBSD-src-e8d76f86d25e64bdb4a9ab0b15c509c07491724a.zip FreeBSD-src-e8d76f86d25e64bdb4a9ab0b15c509c07491724a.tar.gz |
MFC r270096:
Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.
There are still a few outstanding problems; they will be fixed shortly.
Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric: D523
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'etc/autofs/special_hosts')
-rw-r--r-- | etc/autofs/special_hosts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/etc/autofs/special_hosts b/etc/autofs/special_hosts new file mode 100644 index 0000000..f81449d --- /dev/null +++ b/etc/autofs/special_hosts @@ -0,0 +1,17 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ $# -eq 0 ]; then + out=`getent hosts` + [ $? -eq 0 ] || exit 1 + echo "$out" | awk '{ print $2 }' | sort -u + exit 0 +fi + +out=`showmount -e "$1"` +[ $? -eq 0 ] || exit 1 +echo "$out" | awk -v host="$1" \ + 'NR > 1 { printf "%s\t%s:%s ", $1, host, $1 } END { printf "\n" }' + |