]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-daemon: Remove helper variable CTDB_EVENTD
authorMartin Schwenke <mschwenke@ddn.com>
Wed, 29 Oct 2025 10:20:55 +0000 (21:20 +1100)
committerVolker Lendecke <vl@samba.org>
Wed, 25 Feb 2026 12:33:39 +0000 (12:33 +0000)
Simplify the initialisation of the path to eventd in eventd_context
using path_helperdir_append().

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
ctdb/server/eventscript.c
ctdb/tests/local_daemons.sh

index ca6ab22df1c298f7a4391111983eb3d4459b9737..325ea8ec92fc324a67e5955beb335e8788f62974 100644 (file)
@@ -69,8 +69,6 @@ static bool eventd_context_init(TALLOC_CTX *mem_ctx,
                                struct eventd_context **out)
 {
        struct eventd_context *ectx;
-       const char *eventd = CTDB_HELPER_BINDIR "/ctdb-eventd";
-       const char *value;
        int ret;
 
        ectx = talloc_zero(mem_ctx, struct eventd_context);
@@ -80,12 +78,7 @@ static bool eventd_context_init(TALLOC_CTX *mem_ctx,
 
        ectx->ev = ctdb->ev;
 
-       value = getenv("CTDB_EVENTD");
-       if (value != NULL) {
-               eventd = value;
-       }
-
-       ectx->path = talloc_strdup(ectx, eventd);
+       ectx->path = path_helperdir_append(ectx, "ctdb-eventd");
        if (ectx->path == NULL) {
                talloc_free(ectx);
                return false;
index 081f2c0553f41418dc9402ce255db2f1c0d584de..4402ee351f632dab405d76720b80e86ed0d9b9da 100755 (executable)
@@ -15,7 +15,6 @@ export TEST_SCRIPTS_DIR="${CTDB_TEST_DIR}/scripts"
 
 if ! $CTDB_TESTS_ARE_INSTALLED; then
        hdir="$CTDB_SCRIPTS_HELPER_BINDIR"
-       export CTDB_EVENTD="${hdir}/ctdb-eventd"
        export CTDB_LOCK_HELPER="${hdir}/ctdb_lock_helper"
        export CTDB_CLUSTER_MUTEX_HELPER="${hdir}/ctdb_mutex_fcntl_helper"
 fi