ctdb-scripts: Fix location of persistent databases
authorMartin Schwenke <martin@meltin.net>
Mon, 30 Apr 2018 10:26:20 +0000 (20:26 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 1 May 2018 11:31:20 +0000 (13:31 +0200)
If CTDB_DBDIR_PERSISTENT is not set then set the default relative to
CTDB_VARDIR.  The persistent database directory is not (necessarily)
relative to the volatile one.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/00.ctdb

index 532f78b5132e6907518ab50e5c0a71e8a7b6e79f..272dcb1ba355392422b78b718c5a4bd6e189b9c1 100755 (executable)
@@ -65,7 +65,7 @@ check_tdb ()
 
 check_persistent_databases ()
 {
-    _dir="${CTDB_DBDIR_PERSISTENT:-${CTDB_DBDIR:-${CTDB_VARDIR}}/persistent}"
+    _dir="${CTDB_DBDIR_PERSISTENT:-${CTDB_VARDIR}/persistent}"
     [ -d "$_dir" ] || return 0
 
     [ "${CTDB_MAX_PERSISTENT_CHECK_ERRORS:-0}" = "0" ] || return 0