Merge branch 'vendor/TNFTP'
[dragonfly.git] / contrib / amd / scripts / fixrmtab.in
1 #!/bin/sh
2 #
3 # Invalidate /etc/rmtab entries for hosts named.
4 # Restart mountd for changes to take effect.
5 #
6 # usage: fixrmtab host1 host2 ...
7 #
8 # Package:      am-utils-6.0
9 # Author:       Andreas Stolcke <stolcke@icsi.berkeley.edu>
10
11 #set -x
12
13 RMTAB=/etc/rmtab
14 TMP=/tmp/rmtab.$$
15
16 if [ ! -f /etc/rmtab ]; then
17         exit 0
18 fi
19
20 for host in $*
21 do
22         sed -e '/^'$host':/s/^./#/' $RMTAB > $TMP && cp $TMP $RMTAB
23 done
24 rm -f $TMP