diff options
author | James Meyer <james.meyer@operamail.com> | 2009-04-01 03:08:58 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-04-01 03:08:58 (GMT) |
commit | bcd569174e22e6a61d7b232e7f0a169660270a26 (patch) | |
tree | b9aa6e6e031b02f33899bde72eefb6b6ab7f714a /abs/extra-testing/autofs/auto.net | |
parent | 35cac9daefef0c409dd7144e8448b138c1d077a6 (diff) | |
parent | 6379395c4d4159e1ead1ba7170769d791916f605 (diff) | |
download | linhes_pkgbuild-bcd569174e22e6a61d7b232e7f0a169660270a26.zip linhes_pkgbuild-bcd569174e22e6a61d7b232e7f0a169660270a26.tar.gz linhes_pkgbuild-bcd569174e22e6a61d7b232e7f0a169660270a26.tar.bz2 |
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/extra-testing/autofs/auto.net')
-rw-r--r-- | abs/extra-testing/autofs/auto.net | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/extra-testing/autofs/auto.net b/abs/extra-testing/autofs/auto.net new file mode 100644 index 0000000..20861d1 --- /dev/null +++ b/abs/extra-testing/autofs/auto.net @@ -0,0 +1,29 @@ +#!/bin/sh + +# $Id: auto.net,v 1.1 2003/11/15 15:40:14 manolis Exp $ + +# Look at what a host is exporting to determine what we can mount. +# This is very simple, but it appears to work surprisingly well + +key="$1" + +# add "nosymlink" here if you want to suppress symlinking local filesystems +# Note: "nonstrict" is now set by default, remove it if you don't want it. +opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict" + +# Showmount comes in a number of names and varieties. "showmount" is +# typically an older version which accepts the '--no-headers' flag +# but ignores it. "kshowmount" is the newer version installed with knfsd, +# which both accepts and acts on the '--no-headers' flag. +#SHOWMOUNT="kshowmount --no-headers -e $key" +#SHOWMOUNT="showmount -e $key | tail +2" + +# Newer distributions get this right +SHOWMOUNT="/usr/sbin/showmount --no-headers -e $key" + +$SHOWMOUNT | LC_ALL=C sort +0 | \ + awk -v key="$key" -v opts="$opts" -- ' + BEGIN { ORS=""; first=1 } + { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } + END { if (!first) print "\n"; else exit 1 } + ' |