]>
Commit | Line | Data |
---|---|---|
2dfbde63 | 1 | #!/bin/sh |
2 | ||
3 | # $Id$ | |
4 | ||
5 | # Look at what a host is exporting to determine what we can mount. | |
6 | # This is very simple, but it appears to work surprisingly well | |
7 | ||
8 | key="$1" | |
9 | opts="-fstype=nfs,hard,intr,nodev,nosuid" | |
10 | ||
11 | # Showmount comes in a number of names and varieties. "showmount" is | |
12 | # typically an older version which accepts the '--no-headers' flag | |
13 | # but ignores it. "kshowmount" is the newer version installed with knfsd, | |
14 | # which both accepts and acts on the '--no-headers' flag. | |
15 | #SHOWMOUNT="kshowmount --no-headers -e $key" | |
16 | #SHOWMOUNT="showmount -e $key | tail +2" | |
17 | ||
18 | # Newer distributions get this right | |
19 | SHOWMOUNT="showmount --no-headers -e $key" | |
20 | ||
21 | $SHOWMOUNT | sort +0 | sed -e "s|^\([^ ]*\).*|$key\1 $opts $key:\1|" |