From 6e79d4bd229e5db4e435917daf4c57cd79db9265 Mon Sep 17 00:00:00 2001 From: colyli 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 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: mdadm-4.3/systemd/mdcheck_continue.service =================================================================== --- mdadm-4.3.orig/systemd/mdcheck_continue.service +++ mdadm-4.3/systemd/mdcheck_continue.service @@ -13,4 +13,6 @@ Documentation=man:mdadm(8) [Service] Type=oneshot Environment="MDADM_CHECK_DURATION=6 hours" +EnvironmentFile=-/run/sysconfig/mdadm +ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION} Index: mdadm-4.3/systemd/mdcheck_start.service =================================================================== --- mdadm-4.3.orig/systemd/mdcheck_start.service +++ mdadm-4.3/systemd/mdcheck_start.service @@ -13,4 +13,6 @@ Documentation=man:mdadm(8) [Service] Type=oneshot Environment="MDADM_CHECK_DURATION=6 hours" +EnvironmentFile=-/run/sysconfig/mdadm +ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION} Index: mdadm-4.3/systemd/mdmonitor-oneshot.service =================================================================== --- mdadm-4.3.orig/systemd/mdmonitor-oneshot.service +++ mdadm-4.3/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.3/systemd/mdmonitor.service =================================================================== --- mdadm-4.3.orig/systemd/mdmonitor.service +++ mdadm-4.3/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