[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] master - systemd: add deps to order units more properly



Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f8781ea6a0567940f3dd3de78870be3ae880d909
Commit:        f8781ea6a0567940f3dd3de78870be3ae880d909
Parent:        141f26035d67d3d8b6bab98960a219322fc30f32
Author:        Peter Rajnoha <prajnoha redhat com>
AuthorDate:    Fri Oct 12 14:21:25 2012 +0200
Committer:     Peter Rajnoha <prajnoha redhat com>
CommitterDate: Fri Oct 12 14:24:54 2012 +0200

systemd: add deps to order units more properly

lvm2-activation-early.service (generated by activation generator) should
be ordered before cryptsetup.target.

lvm2-monitor.service should be ordered after lvm2-activation.service,
if used. The lvm2-activation.service will replace fedora-storage-init.service
and fedora-storage-init-late.service in the end, but let's have it
prepared now.
---
 .../lvm2_activation_generator_systemd_red_hat.c    |    5 +++--
 scripts/lvm2_monitoring_systemd_red_hat.service.in |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
index 786d795..b8d1cfc 100644
--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
@@ -115,9 +115,10 @@ static int generate_unit(const char *dir, int early)
 	      "SourcePath=/etc/lvm/lvm.conf\n"
 	      "DefaultDependencies=no\n", f);
 
-	if (early)
+	if (early) {
 		fputs("After=systemd-udev-settle.service\n", f);
-	else
+		fputs("Before=cryptsetup.target\n", f);
+	} else
 		fputs("After=lvm2-activation-early.service cryptsetup.target\n", f);
 
 	fputs("Before=local-fs.target shutdown.target\n"
diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in
index 425cb0d..6c4c55f 100644
--- a/scripts/lvm2_monitoring_systemd_red_hat.service.in
+++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in
@@ -2,7 +2,7 @@
 Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
 Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
 Requires=dm-event.socket
-After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-lvmetad.service
+After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-activation.service lvm2-lvmetad.service
 Before=local-fs.target
 DefaultDependencies=no
 Conflicts=shutdown.target


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]