1998-11-14 03:11:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Invalidate /etc/rmtab entries for hosts named.
|
|
|
|
# Restart mountd for changes to take effect.
|
|
|
|
#
|
|
|
|
# usage: fixrmtab host1 host2 ...
|
|
|
|
#
|
2007-12-05 15:48:03 +00:00
|
|
|
# Package: am-utils-6.x
|
1998-11-14 03:11:37 +00:00
|
|
|
# Author: Andreas Stolcke <stolcke@icsi.berkeley.edu>
|
|
|
|
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
RMTAB=/etc/rmtab
|
|
|
|
TMP=/tmp/rmtab.$$
|
|
|
|
|
|
|
|
if [ ! -f /etc/rmtab ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
for host in $*
|
|
|
|
do
|
|
|
|
sed -e '/^'$host':/s/^./#/' $RMTAB > $TMP && cp $TMP $RMTAB
|
|
|
|
done
|
|
|
|
rm -f $TMP
|