diff options
author | trasz <trasz@FreeBSD.org> | 2016-03-23 12:13:53 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2016-03-23 12:13:53 +0000 |
commit | 6fee958d289745f0f52dcc0df16858cf7e093d5c (patch) | |
tree | 27d180cd2ef5ba04581cc4aeb1f0d24cca04c440 /etc | |
parent | e8766307c36e35dac7110c3d9a523b34a8f05dc5 (diff) | |
download | FreeBSD-src-6fee958d289745f0f52dcc0df16858cf7e093d5c.zip FreeBSD-src-6fee958d289745f0f52dcc0df16858cf7e093d5c.tar.gz |
Make the autofs(5) -hosts map more robust, primarily to make it correctly
handle NFS shares containing whitespace. This also adds the -E parameter
to showmount(8).
Reviewed by: emaste@, jhibbits@, wblock@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5649
Diffstat (limited to 'etc')
-rw-r--r-- | etc/autofs/special_hosts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/autofs/special_hosts b/etc/autofs/special_hosts index f81449d..c498546 100644 --- a/etc/autofs/special_hosts +++ b/etc/autofs/special_hosts @@ -10,8 +10,8 @@ if [ $# -eq 0 ]; then exit 0 fi -out=`showmount -e "$1"` +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" }' + '{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }' |