From 27674c413de5cadae633c834d4f2e41f26ab455e Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 20 May 2015 04:19:09 +1000 Subject: [PATCH] ctdb-scripts: Create the directory containing the recovery lock This will handle the most obvious cases. It won't handle the case where the directory is missing and the recovery lock location is updated at run-time. However, this is a good improvement. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/config/events.d/01.reclock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ctdb/config/events.d/01.reclock b/ctdb/config/events.d/01.reclock index ed7afdd78aa..d3dd612471f 100755 --- a/ctdb/config/events.d/01.reclock +++ b/ctdb/config/events.d/01.reclock @@ -10,6 +10,11 @@ loadconfig case "$1" in init) ctdb_counter_init + + if [ -n "$CTDB_RECOVERY_LOCK" ] ; then + d=$(dirname "$CTDB_RECOVERY_LOCK") + mkdir -vp "$d" + fi ;; monitor) -- 2.11.4.GIT