dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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