dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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