ctdb-scripts: Drop file removal involving $ctdb_managed_dir
authorMartin Schwenke <martin@meltin.net>
Mon, 10 Aug 2015 06:33:42 +0000 (16:33 +1000)
committerMichael Adam <obnox@samba.org>
Tue, 15 Sep 2015 06:56:20 +0000 (08:56 +0200)
This directory has been under $CTDB_VARDIR for a long time, so is
already removed.  The command is also potentially dangerous if
$ctdb_managed_dir is not set.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/config/events.d/00.ctdb

index da7186fb61e5b1aee5924c7417930507c545a315..98fb50d5032066cc1047ee028bb374c6d00b6c7d 100755 (executable)
@@ -120,12 +120,10 @@ set_ctdb_variables ()
 
 ctdb_check_args "$@"
 
-case "$1" in 
+case "$1" in
      init)
         # make sure we have a blank state directory for the scripts to work with
        rm -rf $CTDB_VARDIR/state
-       # Look at the pattern - this should not be -rf!!!
-       rm -f $ctdb_managed_dir/*
        mkdir -p $CTDB_VARDIR/state || {
            ret=$?
            echo "mkdir -p $CTDB_VARDIR/state - failed - $ret"