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