|
Harald Hoyer |
eeb1c2 |
From 78a78e4239e16a033134dde71830d5bb977f6814 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
eeb1c2 |
From: Hannes Reinecke <hare@suse.de>
|
|
Harald Hoyer |
eeb1c2 |
Date: Thu, 20 Nov 2014 15:56:45 +0100
|
|
Harald Hoyer |
eeb1c2 |
Subject: [PATCH] 90multipath: install dracut-specific service file
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
The multipathd package might install a service and a socket
|
|
Harald Hoyer |
eeb1c2 |
file. Using the original service file from the installed
|
|
Harald Hoyer |
eeb1c2 |
system without the socket file triggers a bug in systemd,
|
|
Harald Hoyer |
eeb1c2 |
causing systemd to crash.
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
As we don't actually need to socket file in the initrd we
|
|
Harald Hoyer |
eeb1c2 |
should be installing our own service file which does not
|
|
Harald Hoyer |
eeb1c2 |
reference the socket file at all.
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
References: bnc#871610
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
Harald Hoyer |
eeb1c2 |
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
Harald Hoyer |
eeb1c2 |
---
|
|
Harald Hoyer |
eeb1c2 |
modules.d/90multipath/module-setup.sh | 7 +++----
|
|
Harald Hoyer |
eeb1c2 |
modules.d/90multipath/multipathd.service | 15 +++++++++++++++
|
|
Harald Hoyer |
eeb1c2 |
2 files changed, 18 insertions(+), 4 deletions(-)
|
|
Harald Hoyer |
eeb1c2 |
create mode 100644 modules.d/90multipath/multipathd.service
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
|
Harald Hoyer |
eeb1c2 |
index 6f4728a..a8700f4 100755
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/90multipath/module-setup.sh
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/90multipath/module-setup.sh
|
|
Harald Hoyer |
eeb1c2 |
@@ -104,10 +104,9 @@ install() {
|
|
Harald Hoyer |
eeb1c2 |
fi
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
if dracut_module_included "systemd"; then
|
|
Harald Hoyer |
eeb1c2 |
- inst_multiple \
|
|
Harald Hoyer |
eeb1c2 |
- $systemdsystemunitdir/multipathd.service
|
|
Harald Hoyer |
eeb1c2 |
- mkdir -p "${initdir}${systemdsystemconfdir}/sysinit.target.wants"
|
|
Harald Hoyer |
eeb1c2 |
- ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemconfdir}/sysinit.target.wants/multipathd.service"
|
|
Harald Hoyer |
eeb1c2 |
+ inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
|
|
Harald Hoyer |
eeb1c2 |
+ mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
|
|
Harald Hoyer |
eeb1c2 |
+ ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/multipathd.service"
|
|
Harald Hoyer |
eeb1c2 |
else
|
|
Harald Hoyer |
eeb1c2 |
inst_hook pre-trigger 02 "$moddir/multipathd.sh"
|
|
Harald Hoyer |
eeb1c2 |
inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
|
|
Harald Hoyer |
eeb1c2 |
new file mode 100644
|
|
Harald Hoyer |
eeb1c2 |
index 0000000..44a7b80
|
|
Harald Hoyer |
eeb1c2 |
--- /dev/null
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/90multipath/multipathd.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -0,0 +1,15 @@
|
|
Harald Hoyer |
eeb1c2 |
+[Unit]
|
|
Harald Hoyer |
eeb1c2 |
+Description=Device-Mapper Multipath Device Controller
|
|
Harald Hoyer |
eeb1c2 |
+Before=iscsi.service iscsid.service lvm2-activation-early.service
|
|
Harald Hoyer |
eeb1c2 |
+DefaultDependencies=no
|
|
Harald Hoyer |
eeb1c2 |
+Conflicts=shutdown.target
|
|
Harald Hoyer |
eeb1c2 |
+
|
|
Harald Hoyer |
eeb1c2 |
+[Service]
|
|
Harald Hoyer |
eeb1c2 |
+Type=simple
|
|
Harald Hoyer |
eeb1c2 |
+ExecStartPre=/sbin/modprobe dm-multipath
|
|
Harald Hoyer |
eeb1c2 |
+ExecStart=/sbin/multipathd -s -d
|
|
Harald Hoyer |
eeb1c2 |
+ExecReload=/sbin/multipathd reconfigure
|
|
Harald Hoyer |
eeb1c2 |
+ExecStop=/sbin/multipathd shutdown
|
|
Harald Hoyer |
eeb1c2 |
+
|
|
Harald Hoyer |
eeb1c2 |
+[Install]
|
|
Harald Hoyer |
eeb1c2 |
+WantedBy=sysinit.target
|