summaryrefslogtreecommitdiffstats
path: root/ctdb/config/events.d/00.ctdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-12 11:24:08 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-23 10:38:49 +0100
commit3419e9c4dd8f59865783e183ee2177870a776180 (patch)
treeda8cf7b867b9915a802f28c36a8c2466652b1ad7 /ctdb/config/events.d/00.ctdb
parent061c2a71822cc5ecc72316c9946b2a9989b91db0 (diff)
downloadsamba-3419e9c4dd8f59865783e183ee2177870a776180.tar.gz
samba-3419e9c4dd8f59865783e183ee2177870a776180.tar.xz
samba-3419e9c4dd8f59865783e183ee2177870a776180.zip
server: add "setup" event
This is needed because the "init" event can't use 'ctdb' commands. metze (This used to be ctdb commit 1493436b6b24eb05a23b7a339071ad85f70de8f4)
Diffstat (limited to 'ctdb/config/events.d/00.ctdb')
-rwxr-xr-xctdb/config/events.d/00.ctdb8
1 files changed, 7 insertions, 1 deletions
diff --git a/ctdb/config/events.d/00.ctdb b/ctdb/config/events.d/00.ctdb
index 03310b7c20..5255617a0a 100755
--- a/ctdb/config/events.d/00.ctdb
+++ b/ctdb/config/events.d/00.ctdb
@@ -16,8 +16,14 @@ case "$1" in
init)
# make sure we have a blank state directory for the scripts to work with
/bin/rm -rf $CTDB_BASE/state
- /bin/mkdir -p $CTDB_BASE/state
+ /bin/mkdir -p $CTDB_BASE/state || {
+ ret=$?
+ echo "/bin/mkdir -p $CTDB_BASE/state - failed - $ret"
+ exit $ret
+ }
+ ;;
+ setup)
# set any tunables from the config file
set | grep ^CTDB_SET_ | cut -d_ -f3- |
while read v; do