From: Martin Schwenke Date: Mon, 6 Jul 2026 10:57:14 +0000 (+1000) Subject: ctdb: Use CTDB_PIDDIR and CTDB_SOCKETDIR X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bccea37e03dbd1c5e77ea2cf987b2198cb3fc962;p=thirdparty%2Fsamba.git ctdb: Use CTDB_PIDDIR and CTDB_SOCKETDIR These are now used in path_*() functions, the default CTDB_SOCKET define and substitution in ctdb.service. Signed-off-by: Martin Schwenke Reviewed-by: Anoop C S --- diff --git a/ctdb/common/path.c b/ctdb/common/path.c index e207641beb9..9d23ddcd512 100644 --- a/ctdb/common/path.c +++ b/ctdb/common/path.c @@ -321,7 +321,7 @@ char *path_socket(TALLOC_CTX *mem_ctx, const char *daemon) return talloc_asprintf(mem_ctx, "%s/%s.socket", - path_rundir(), + path_socketdir(), daemon); } @@ -329,6 +329,6 @@ char *path_pidfile(TALLOC_CTX *mem_ctx, const char *daemon) { return talloc_asprintf(mem_ctx, "%s/%s.pid", - path_rundir(), + path_piddir(), daemon); } diff --git a/ctdb/wscript b/ctdb/wscript index d8db80b4982..b223524bc68 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -313,7 +313,7 @@ def configure(conf): if Options.options.ctdb_sockpath: conf.env.CTDB_SOCKPATH = Options.options.ctdb_sockpath else: - conf.env.CTDB_SOCKPATH = os.path.join(conf.env.CTDB_RUNDIR, + conf.env.CTDB_SOCKPATH = os.path.join(conf.env.CTDB_SOCKETDIR, 'ctdbd.socket') conf.define('CTDB_SOCKET', conf.env.CTDB_SOCKPATH) diff --git a/packaging/systemd/ctdb.service.in b/packaging/systemd/ctdb.service.in index 7905a93e242..8edd7522869 100644 --- a/packaging/systemd/ctdb.service.in +++ b/packaging/systemd/ctdb.service.in @@ -9,7 +9,7 @@ Type=forking LimitCORE=infinity LimitNOFILE=1048576 TasksMax=4096 -PIDFile=@CTDB_RUNDIR@/ctdbd.pid +PIDFile=@CTDB_PIDDIR@/ctdbd.pid ExecStart=@SBINDIR@/ctdbd ExecStop=@BINDIR@/ctdb shutdown KillMode=control-group