summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-02-23 11:24:07 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2012-02-23 11:24:07 +0000
commitda532741c98678536b7620e6121b45ef0f28b11b (patch)
treed56f50dbb6501f32400f717a632071b454675a56 /scripts
parent2c893455adb780e38ce1b2d6b45272bb9425731c (diff)
downloadlvm2-da532741c98678536b7620e6121b45ef0f28b11b.tar.gz
lvm2-da532741c98678536b7620e6121b45ef0f28b11b.tar.xz
lvm2-da532741c98678536b7620e6121b45ef0f28b11b.zip
Add LVMetaD systemd units.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.in4
-rw-r--r--scripts/lvm2_lvmetad_systemd_red_hat.service.in15
-rw-r--r--scripts/lvm2_lvmetad_systemd_red_hat.socket10
3 files changed, 29 insertions, 0 deletions
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 5a04cb52..29d1aef8 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -63,6 +63,10 @@ ifeq ("@BUILD_DMEVENTD@", "yes")
$(INSTALL_DATA) dm_event_systemd_red_hat.service $(systemd_dir)/dm-event.service
$(INSTALL_DATA) lvm2_monitoring_systemd_red_hat.service $(systemd_dir)/lvm2-monitor.service
endif
+ifeq ("@BUILD_LVMETAD@", "yes")
+ $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.socket $(systemd_dir)/lvm2-lvmetad.socket
+ $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.service.in $(systemd_dir)/lvm2-lvmetad.service
+endif
install_tmpfiles_configuration:
$(INSTALL_DIR) $(tmpfiles_dir)
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.service.in b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
new file mode 100644
index 00000000..f0f603ed
--- /dev/null
+++ b/scripts/lvm2_lvmetad_systemd_red_hat.service.in
@@ -0,0 +1,15 @@
+[Unit]
+Description=LVM2 metadata daemon
+Requires=lvm2-lvmetad.socket
+After=lvm2-lvmetad.socket
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Service]
+Type=forking
+ExecStart=@sbindir@/lvmetad
+ExecReload=@sbindir@/lvmetad -R
+PIDFile=/var/run/lvm/lvmetad.pid
+
+[Install]
+WantedBy=sysinit.target
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.socket b/scripts/lvm2_lvmetad_systemd_red_hat.socket
new file mode 100644
index 00000000..a17232b7
--- /dev/null
+++ b/scripts/lvm2_lvmetad_systemd_red_hat.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=LVM2 metadata daemon socket
+DefaultDependencies=no
+
+[Socket]
+ListenStream=/var/run/lvm/lvmetad.socket
+SocketMode=0600
+
+[Install]
+WantedBy=sockets.target