[device-mapper-multipath] Install multipathd.service for sysinit.target instead of multi-user.target

Peter Rajnoha prajnoha at fedoraproject.org
Sat Nov 3 08:24:54 UTC 2012


commit d0371527d65cf04fb04cc1ae82e6d6c08fe5943b
Author: Peter Rajnoha <prajnoha at redhat.com>
Date:   Sat Nov 3 09:24:34 2012 +0100

    Install multipathd.service for sysinit.target instead of multi-user.target

 0025-RH-fix-systemd-start-order.patch |   18 ++++++++++++++++++
 device-mapper-multipath.spec          |   12 +++++++++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/0025-RH-fix-systemd-start-order.patch b/0025-RH-fix-systemd-start-order.patch
new file mode 100644
index 0000000..00f05fc
--- /dev/null
+++ b/0025-RH-fix-systemd-start-order.patch
@@ -0,0 +1,18 @@
+diff -purN old/multipathd/multipathd.service new/multipathd/multipathd.service
+--- old/multipathd/multipathd.service	2012-11-02 15:03:38.024721232 +0100
++++ new/multipathd/multipathd.service	2012-11-02 15:11:54.386624285 +0100
+@@ -2,6 +2,8 @@
+ Description=Device-Mapper Multipath Device Controller
+ Before=iscsi.service iscsid.service lvm2-activation-early.service
+ After=syslog.target
++DefaultDependencies=no
++Conflicts=shutdown.target
+ ConditionPathExists=/etc/multipath.conf
+ 
+ [Service]
+@@ -12,4 +14,4 @@ ExecReload=/sbin/multipathd reconfigure
+ #ExecStop=/path/to/scrip delete-me if not necessary
+ 
+ [Install]
+-WantedBy=multi-user.target
++WantedBy=sysinit.target
diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec
index 9796cb8..2b6693e 100644
--- a/device-mapper-multipath.spec
+++ b/device-mapper-multipath.spec
@@ -1,7 +1,7 @@
 Summary: Tools to manage multipath devices using device-mapper
 Name: device-mapper-multipath
 Version: 0.4.9
-Release: 36%{?dist}
+Release: 37%{?dist}
 License: GPL+
 Group: System Environment/Base
 URL: http://christophe.varoqui.free.fr/
@@ -32,6 +32,7 @@ Patch0021: 0021-RH-fix-oom-adj.patch
 Patch0022: 0022-RHBZ-864368-disable-libdm-failback.patch
 Patch0023: 0023-RHBZ-866291-update-documentation.patch
 Patch0024: 0024-RH-start-multipathd-service-before-lvm.patch
+Patch0025: 0025-RH-fix-systemd-start-order.patch
 
 # runtime
 Requires: %{name}-libs = %{version}-%{release}
@@ -108,6 +109,7 @@ kpartx manages partition creation and removal for device-mapper devices.
 %patch0022 -p1
 %patch0023 -p1
 %patch0024 -p1
+%patch0025 -p1
 cp %{SOURCE1} .
 
 %build
@@ -143,6 +145,11 @@ rm -rf %{buildroot}
 %postun
 %systemd_postun_with_restart multipathd.service
 
+%triggerun -- %{name} < 0.4.9-37
+# make sure old systemd symlinks are removed after changing the [Install]
+# section in multipathd.service from multi-user.target to sysinit.target
+/bin/systemctl --quiet is-enabled multipathd.service >/dev/null 2>&1 && /bin/systemctl reenable multipathd.service ||:
+
 %triggerun --  %{name} < 0.4.9-16
 %{_bindir}/systemd-sysv-convert --save multipathd >/dev/null 2>&1 ||: 
 bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
@@ -194,6 +201,9 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
 %{_mandir}/man8/kpartx.8.gz
 
 %changelog
+* Sat Nov 03 2012 Peter Rajnoha <prajnoha at redhat.com> 0.4.9-37
+- Install multipathd.service for sysinit.target instead of multi-user.target.
+
 * Thu Nov 01 2012 Peter Rajnoha <prajnoha at redhat.com> 0.4.9-36
 - Start multipathd.service systemd unit before LVM units.
 


More information about the scm-commits mailing list