From: Mathieu Desnoyers Date: Mon, 19 Aug 2013 19:03:27 +0000 (-0400) Subject: Introduce configure --with-lttng-system-rundir X-Git-Tag: v2.3.0-rc3~37 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d386c872c7c9a05b367355fa6bbcb5946e93bacd;p=lttng-tools.git Introduce configure --with-lttng-system-rundir Allow overriding the path where the system-wide sessiond keeps its runtime files. It does _not_ allow multiple instances of system-wide sessiond to run in parallel though, because the wait shm files still requires having only one single system-wide sessiond at any given time. Fixes #521 Signed-off-by: Mathieu Desnoyers --- diff --git a/configure.ac b/configure.ac index 32efa9357..4a693ffe8 100644 --- a/configure.ac +++ b/configure.ac @@ -110,6 +110,13 @@ AC_ARG_WITH([sessiond-bin], [SESSIOND_BIN='']) AC_SUBST([SESSIOND_BIN]) +AC_ARG_WITH([lttng-system-rundir], + AS_HELP_STRING([--with-lttng-system-rundir], + [Location of the system directory where the system-wide lttng-sessiond runtime files are kept. The default is "/var/run/lttng".]), + [LTTNG_SYSTEM_RUNDIR="$withval"], + [LTTNG_SYSTEM_RUNDIR="/var/run/lttng"]) +AC_SUBST([LTTNG_SYSTEM_RUNDIR]) + AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_BIN], "$CONSUMERD32_BIN", [Location of the 32-bit consumerd executable.]) AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_BIN], "$CONSUMERD64_BIN", [Location of the 64-bit consumerd executable]) AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_LIBDIR], "$CONSUMERD32_LIBDIR", [Search for consumerd 32-bit libraries in this location.]) @@ -117,6 +124,7 @@ AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_LIBDIR], "$CONSUMERD64_LIBDIR", [Search f AC_DEFINE_UNQUOTED([CONFIG_BABELTRACE_BIN], "$BABELTRACE_BIN", [Location of the babeltrace viewer executable.]) AC_DEFINE_UNQUOTED([CONFIG_LTTV_GUI_BIN], "$LTTV_GUI_BIN", [Location of the lttv GUI viewer executable.]) AC_DEFINE_UNQUOTED([CONFIG_SESSIOND_BIN], "$SESSIOND_BIN", [Location of the sessiond executable.]) +AC_DEFINE_UNQUOTED([CONFIG_LTTNG_SYSTEM_RUNDIR], ["$LTTNG_SYSTEM_RUNDIR"], [LTTng system runtime directory]) # Check for pthread AC_CHECK_LIB([pthread], [pthread_create], [], diff --git a/src/common/defaults.h b/src/common/defaults.h index 242be1e72..7bb10c2af 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -19,6 +19,8 @@ #ifndef _DEFAULTS_H #define _DEFAULTS_H +#include + /* Default unix group name for tracing. */ #define DEFAULT_TRACING_GROUP "tracing" @@ -79,7 +81,7 @@ /* Default lttng run directory */ #define DEFAULT_LTTNG_HOME_ENV_VAR "LTTNG_HOME" #define DEFAULT_LTTNG_FALLBACK_HOME_ENV_VAR "HOME" -#define DEFAULT_LTTNG_RUNDIR "/var/run/lttng" +#define DEFAULT_LTTNG_RUNDIR CONFIG_LTTNG_SYSTEM_RUNDIR #define DEFAULT_LTTNG_HOME_RUNDIR "%s/.lttng" #define DEFAULT_LTTNG_SESSIOND_PIDFILE "lttng-sessiond.pid"