diff options
author | Martin Schwenke <martin@meltin.net> | 2010-12-17 16:23:31 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2011-08-09 16:48:57 +1000 |
commit | f36bae1cbf710cd8b9410c72a5eed6c558275936 (patch) | |
tree | d17a2761eb2133501dacb9730a751acb371e8069 | |
parent | dd56cde3ff21cd5cba17d3f81cbf45b3becf900b (diff) | |
download | samba-f36bae1cbf710cd8b9410c72a5eed6c558275936.tar.gz samba-f36bae1cbf710cd8b9410c72a5eed6c558275936.tar.xz samba-f36bae1cbf710cd8b9410c72a5eed6c558275936.zip |
Eventscripts: fix dangerous rm -rf in 00.ctdb init event.
Also remove some unnecessary absolute paths for commands, which were
making the code slightly difficult to read.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1b3f2dd62efb240f8486016fe0f8dfb73d6ccc66)
-rwxr-xr-x | ctdb/config/events.d/00.ctdb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/config/events.d/00.ctdb b/ctdb/config/events.d/00.ctdb index 2111c23788..31f8fdc79b 100755 --- a/ctdb/config/events.d/00.ctdb +++ b/ctdb/config/events.d/00.ctdb @@ -38,7 +38,9 @@ update_config_from_tdb() { case "$1" in init) # make sure we have a blank state directory for the scripts to work with - rm -rf $CTDB_VARDIR/state $ctdb_active_dir/* + 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" |