1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-26 18:50:30 +03:00

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)
This commit is contained in:
Martin Schwenke 2010-12-17 16:23:31 +11:00
parent dd56cde3ff
commit f36bae1cbf

View File

@ -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"