forked from pool/mdadm
89b8aa4b81
0013-mdcheck-use-to-pass-variable-to-mdcheck.patch 0014-SUSE-mdadm_env.sh-handle-MDADM_CHECK_DURATION.patch Improve mdcheck (bsc#1153258) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=177
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From fde9606a9780cf2701fa903eeb528b9f4400282e Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Wed, 30 Oct 2019 09:25:00 +1100
|
|
Subject: [PATCH] mdcheck: use ${} to pass variable to mdcheck
|
|
|
|
$MDADM_CHECK_DURATION allows the value to be split on spaces.
|
|
${MDADM_CHECK_DURATION} avoids such splitting.
|
|
|
|
Making this change removes the need for double quoting when setting
|
|
the default Environment, and means that double quoting isn't needed
|
|
in the EnvironmentFile.
|
|
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
---
|
|
systemd/mdcheck_continue.service | 5 ++---
|
|
systemd/mdcheck_start.service | 4 ++--
|
|
2 files changed, 4 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/systemd/mdcheck_continue.service b/systemd/mdcheck_continue.service
|
|
index 592c60798f82..deac695485b0 100644
|
|
--- a/systemd/mdcheck_continue.service
|
|
+++ b/systemd/mdcheck_continue.service
|
|
@@ -11,8 +11,7 @@ ConditionPathExistsGlob = /var/lib/mdcheck/MD_UUID_*
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
-Environment= MDADM_CHECK_DURATION='"6 hours"'
|
|
+Environment= MDADM_CHECK_DURATION="6 hours"
|
|
EnvironmentFile=-/run/sysconfig/mdadm
|
|
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
|
|
-ExecStart=/usr/share/mdadm/mdcheck --continue --duration $MDADM_CHECK_DURATION
|
|
-
|
|
+ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION}
|
|
diff --git a/systemd/mdcheck_start.service b/systemd/mdcheck_start.service
|
|
index 812141bb5c9a..f17f1aaec217 100644
|
|
--- a/systemd/mdcheck_start.service
|
|
+++ b/systemd/mdcheck_start.service
|
|
@@ -11,7 +11,7 @@ Wants=mdcheck_continue.timer
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
-Environment= MDADM_CHECK_DURATION='"6 hours"'
|
|
+Environment= MDADM_CHECK_DURATION="6 hours"
|
|
EnvironmentFile=-/run/sysconfig/mdadm
|
|
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
|
|
-ExecStart=/usr/share/mdadm/mdcheck --duration $MDADM_CHECK_DURATION
|
|
+ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}
|
|
--
|
|
2.23.0
|
|
|