From: Martin Schwenke Date: Tue, 19 May 2015 18:19:09 +0000 (+1000) Subject: ctdb-scripts: Create the directory containing the recovery lock X-Git-Tag: talloc-2.1.3~378 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=27674c413de5cadae633c834d4f2e41f26ab455e;p=vlendec%2Fsamba-autobuild%2F.git 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 --- 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)