]> git.pld-linux.org Git - packages/autofs.git/blame - autofs-auto.net
- updated to 5.1.0
[packages/autofs.git] / autofs-auto.net
CommitLineData
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
8key="$1"
9opts="-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
19SHOWMOUNT="showmount --no-headers -e $key"
20
21$SHOWMOUNT | sort +0 | sed -e "s|^\([^ ]*\).*|$key\1 $opts $key:\1|"
This page took 0.078792 seconds and 4 git commands to generate.