packaging: Move ctdb/ directory from /var to /var/lib
authorAmitay Isaacs <amitay@gmail.com>
Thu, 3 Oct 2013 05:47:30 +0000 (15:47 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 25 Oct 2013 01:06:07 +0000 (12:06 +1100)
Introduce CTDB_VARDIR variable that points to /var/lib/ctdb by default.
This makes CTDB_VARDIR consistent across C code and scripts.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Makefile.in
server/ctdbd.c

index 0ae22e5eceaf3fe56c756598d44e5f56f60445c2..4fed9a7a042b82d7a2e040f780523d08b2341402 100755 (executable)
@@ -65,6 +65,7 @@ endif
 CFLAGS=@CPPFLAGS@ -g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
        $(TALLOC_CFLAGS) $(TEVENT_CFLAGS) $(TDB_CFLAGS) -I@libreplacedir@ \
        -DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
+       -DCTDB_VARDIR=\"$(localstatedir)/lib/ctdb\" \
        -DLOGDIR=\"$(logdir)\" -DBINDIR=\"$(bindir)\" \
        -DSOCKPATH=\"$(sockpath)\" \
        -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS) \
index 7fe99ba3118c2206cb82c3a39da7d9323bd331b8..5bf48a1a219d116d25421034dcb463eb9ed20de4 100644 (file)
@@ -57,9 +57,9 @@ static struct {
        .transport = "tcp",
        .event_script_dir = NULL,
        .logfile = LOGDIR "/log.ctdb",
-       .db_dir = VARDIR "/ctdb",
-       .db_dir_persistent = VARDIR "/ctdb/persistent",
-       .db_dir_state = VARDIR "/ctdb/state",
+       .db_dir = CTDB_VARDIR,
+       .db_dir_persistent = CTDB_VARDIR "/persistent",
+       .db_dir_state = CTDB_VARDIR "/state",
        .script_log_level = DEBUG_ERR,
 };