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>
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);
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;
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