mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 11:20:58 +01:00
ad8bcc147f
Sponsored by: Juniper Networks
25 lines
404 B
Bash
Executable File
25 lines
404 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Invalidate /etc/rmtab entries for hosts named.
|
|
# Restart mountd for changes to take effect.
|
|
#
|
|
# usage: fixrmtab host1 host2 ...
|
|
#
|
|
# Package: am-utils-6.x
|
|
# 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
|