dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/0045-mdcheck-use-to-pass-variable-to-mdcheck.patch

f5dd7b
From 4ca799c581703d4d0ad840833c037c2fff088ca7 Mon Sep 17 00:00:00 2001
f5dd7b
From: NeilBrown <neilb@suse.de>
f5dd7b
Date: Wed, 30 Oct 2019 10:32:41 +1100
f5dd7b
Subject: [RHEL7.8 PATCH V2 45/47] mdcheck: use ${} to pass variable to mdcheck
f5dd7b
f5dd7b
$MDADM_CHECK_DURATION allows the value to be split on spaces.
f5dd7b
${MDADM_CHECK_DURATION} avoids such splitting.
f5dd7b
f5dd7b
Making this change removes the need for double quoting when setting
f5dd7b
the default Environment, and means that double quoting isn't needed
f5dd7b
in the EnvironmentFile.
f5dd7b
f5dd7b
Signed-off-by: NeilBrown <neilb@suse.de>
f5dd7b
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
f5dd7b
---
f5dd7b
 systemd/mdcheck_continue.service | 5 ++---
f5dd7b
 systemd/mdcheck_start.service    | 4 ++--
f5dd7b
 2 files changed, 4 insertions(+), 5 deletions(-)
f5dd7b
f5dd7b
diff --git a/systemd/mdcheck_continue.service b/systemd/mdcheck_continue.service
f5dd7b
index 592c607..deac695 100644
f5dd7b
--- a/systemd/mdcheck_continue.service
f5dd7b
+++ b/systemd/mdcheck_continue.service
f5dd7b
@@ -11,8 +11,7 @@ ConditionPathExistsGlob = /var/lib/mdcheck/MD_UUID_*
f5dd7b
 
f5dd7b
 [Service]
f5dd7b
 Type=oneshot
f5dd7b
-Environment= MDADM_CHECK_DURATION='"6 hours"'
f5dd7b
+Environment= MDADM_CHECK_DURATION="6 hours"
f5dd7b
 EnvironmentFile=-/run/sysconfig/mdadm
f5dd7b
 ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
f5dd7b
-ExecStart=/usr/share/mdadm/mdcheck --continue --duration $MDADM_CHECK_DURATION
f5dd7b
-
f5dd7b
+ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION}
f5dd7b
diff --git a/systemd/mdcheck_start.service b/systemd/mdcheck_start.service
f5dd7b
index 812141b..f17f1aa 100644
f5dd7b
--- a/systemd/mdcheck_start.service
f5dd7b
+++ b/systemd/mdcheck_start.service
f5dd7b
@@ -11,7 +11,7 @@ Wants=mdcheck_continue.timer
f5dd7b
 
f5dd7b
 [Service]
f5dd7b
 Type=oneshot
f5dd7b
-Environment= MDADM_CHECK_DURATION='"6 hours"'
f5dd7b
+Environment= MDADM_CHECK_DURATION="6 hours"
f5dd7b
 EnvironmentFile=-/run/sysconfig/mdadm
f5dd7b
 ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
f5dd7b
-ExecStart=/usr/share/mdadm/mdcheck --duration $MDADM_CHECK_DURATION
f5dd7b
+ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}
f5dd7b
-- 
f5dd7b
2.7.5
f5dd7b