fixrmtab.in revision 1.1.1.1.4.2
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.x 9# Author: Andreas Stolcke <stolcke@icsi.berkeley.edu> 10 11#set -x 12 13RMTAB=/etc/rmtab 14TMP=/tmp/rmtab.$$ 15 16if [ ! -f /etc/rmtab ]; then 17 exit 0 18fi 19 20for host in $* 21do 22 sed -e '/^'$host':/s/^./#/' $RMTAB > $TMP && cp $TMP $RMTAB 23done 24rm -f $TMP 25