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