mdadm/1004-call-mdadm_env.sh-from-usr-libexec-mdadm.patch

62 lines
2.6 KiB
Diff
Raw Normal View History

From 6e79d4bd229e5db4e435917daf4c57cd79db9265 Mon Sep 17 00:00:00 2001
From: colyli <colyli@suse.coly>
Date: Wed, 17 Oct 2018 11:08:39 +0800
Subject: [PATCH] Call mdadm_env.sh from /usr/libexec/mdadm
Patch-mainline: N/A, SUSE only patch
References: bsc#1111960, bsc#1202090
Current Makefile installs mdadm_env.sh to /usr/libexec/mdadm but the
systemd service files call it from /usr/lib/mdadm. This patch changes
the calling path in systemd service files to /usr/libexec/mdadm to
make things working.
Signed-off-by: Coly Li <colyli@suse.de>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mdadm-4.2/systemd/mdcheck_continue.service
===================================================================
--- mdadm-4.2.orig/systemd/mdcheck_continue.service
+++ mdadm-4.2/systemd/mdcheck_continue.service
@@ -14,5 +14,5 @@ Documentation=man:mdadm(8)
Type=oneshot
Environment="MDADM_CHECK_DURATION=6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh
ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION}
Index: mdadm-4.2/systemd/mdcheck_start.service
===================================================================
--- mdadm-4.2.orig/systemd/mdcheck_start.service
+++ mdadm-4.2/systemd/mdcheck_start.service
@@ -14,5 +14,5 @@ Documentation=man:mdadm(8)
Type=oneshot
Environment="MDADM_CHECK_DURATION=6 hours"
EnvironmentFile=-/run/sysconfig/mdadm
-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh
ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}
Index: mdadm-4.2/systemd/mdmonitor-oneshot.service
===================================================================
--- mdadm-4.2.orig/systemd/mdmonitor-oneshot.service
+++ mdadm-4.2/systemd/mdmonitor-oneshot.service
@@ -12,5 +12,5 @@ Documentation=man:mdadm(8)
[Service]
Environment=MDADM_MONITOR_ARGS=--scan
EnvironmentFile=-/run/sysconfig/mdadm
-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh
ExecStart=BINDIR/mdadm --monitor --oneshot $MDADM_MONITOR_ARGS
Index: mdadm-4.2/systemd/mdmonitor.service
===================================================================
--- mdadm-4.2.orig/systemd/mdmonitor.service
+++ mdadm-4.2/systemd/mdmonitor.service
@@ -13,5 +13,5 @@ Documentation=man:mdadm(8)
[Service]
Environment= MDADM_MONITOR_ARGS=--scan
EnvironmentFile=-/run/sysconfig/mdadm
-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh
ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS