summaryrefslogtreecommitdiff
path: root/daemons/dmeventd/dmeventd.c
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2014-03-14 15:57:28 +0100
committerPeter Rajnoha <prajnoha@redhat.com>2014-03-14 15:57:44 +0100
commitb16235de96a18c9e9e619bebe506d41f80fff834 (patch)
treec644b5b4b8bf1dd785abd4b480447c5dc1450955 /daemons/dmeventd/dmeventd.c
parentada47c164ae56b586fae7500be2d6aa66f5323b1 (diff)
downloadlvm2-b16235de96a18c9e9e619bebe506d41f80fff834.tar.gz
cleanup: use 'define' for systemd runtime unit file directory
Diffstat (limited to 'daemons/dmeventd/dmeventd.c')
-rw-r--r--daemons/dmeventd/dmeventd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index 6206058e0..f4f09b81a 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -55,6 +55,7 @@
# define OOM_SCORE_ADJ_MIN (-1000)
/* Systemd on-demand activation support */
+# define SD_RUNTIME_UNIT_FILE_DIR DEFAULT_DM_RUN_DIR "/systemd/system/"
# define SD_ACTIVATION_ENV_VAR_NAME "SD_ACTIVATION"
# define SD_LISTEN_PID_ENV_VAR_NAME "LISTEN_PID"
# define SD_LISTEN_FDS_ENV_VAR_NAME "LISTEN_FDS"
@@ -1997,7 +1998,7 @@ static void restart(void)
if (version < 2) {
/* This check is copied from sd-daemon.c. */
struct stat st;
- if (!lstat("/run/systemd/system/", &st) && !!S_ISDIR(st.st_mode))
+ if (!lstat(SD_RUNTIME_UNIT_FILE_DIR, &st) && !!S_ISDIR(st.st_mode))
_systemd_activation = 1;
}
#endif