summaryrefslogtreecommitdiffstats
path: root/scripts/lvm2_lvmetad_systemd_red_hat.service.in
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-03-14 15:51:51 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2012-03-14 15:51:51 +0000
commit93945bb6160b333a48b089977436356bfb5948e0 (patch)
tree8cf8c7cfa967743310ce594785809b3dcbef485f /scripts/lvm2_lvmetad_systemd_red_hat.service.in
parent88bba90e6ef9f8bd3982584d3a91c13c870096dc (diff)
downloadlvm2-93945bb6160b333a48b089977436356bfb5948e0.tar.gz
lvm2-93945bb6160b333a48b089977436356bfb5948e0.tar.xz
lvm2-93945bb6160b333a48b089977436356bfb5948e0.zip
Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.
LISTEN_PID and LISTEN_FDS environment variables are defined only during systemd "start" action. But we still need to know whether we're activated during "reload" action as well - we use the reload action to call "dmeventd -R"/"lvmetad -R" for statefull daemon restart. We can't use normal "restart" as that is simply composed of "stop" and "start" and we would lose any state the daemon has.
Diffstat (limited to 'scripts/lvm2_lvmetad_systemd_red_hat.service.in')
-rw-r--r--scripts/lvm2_lvmetad_systemd_red_hat.service.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.service.in b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
index afb46c22..44827fde 100644
--- a/scripts/lvm2_lvmetad_systemd_red_hat.service.in
+++ b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
@@ -11,6 +11,7 @@ NonBlocking=true
ExecStart=@sbindir@/lvmetad
ExecStartPost=@sbindir@/vgscan
ExecReload=@sbindir@/lvmetad -R
+Environment=SD_ACTIVATION=1
Restart=on-abort
PIDFile=@DEFAULT_RUN_DIR@/lvmetad.pid