Fix bashism in nfstickle event script.
authorMathieu Parent <math.parent@gmail.com>
Thu, 27 Aug 2009 21:44:39 +0000 (23:44 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 9 Sep 2009 07:52:13 +0000 (09:52 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
config/events.d/61.nfstickle

index 5fa62065bd4d42da0233359731f209f687f23240..60c13bc61d9b174df84346e05176241f8eb1ff0d 100755 (executable)
@@ -25,13 +25,12 @@ case $cmd in
      takeip)
        iface=$1
        ip=$2
-       shopt -s nullglob
        # first send a grat arp, to ensure the client knows the updated
        # mac address for this IP
        ctdb gratiousarp $ip $iface
        # send tickle acks for all the connections the old server had
        for f in $NFS_TICKLE_SHARED_DIRECTORY/*/$ip; do
-               cat $f | while read dest; do
+               [ -f $f ] && cat $f | while read dest; do
                        dip=`echo $dest | cut -d: -f1`
                        dport=`echo $dest | cut -d: -f2`
                        # send three, in case of lost packets