2020-03-04 05:49:18 +01:00
|
|
|
From 4ca799c581703d4d0ad840833c037c2fff088ca7 Mon Sep 17 00:00:00 2001
|
2019-10-30 01:13:13 +01:00
|
|
|
From: NeilBrown <neilb@suse.de>
|
2020-03-04 05:49:18 +01:00
|
|
|
Date: Wed, 30 Oct 2019 10:32:41 +1100
|
2019-10-30 01:13:13 +01:00
|
|
|
Subject: [PATCH] mdcheck: use ${} to pass variable to mdcheck
|
2020-03-04 05:49:18 +01:00
|
|
|
Git-commit: 4ca799c581703d4d0ad840833c037c2fff088ca7
|
|
|
|
Patch-mainline: mdadm-4.1+
|
|
|
|
References: bsc#1153258
|
2019-10-30 01:13:13 +01:00
|
|
|
|
|
|
|
$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>
|
2020-03-04 05:49:18 +01:00
|
|
|
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
2019-10-30 01:13:13 +01:00
|
|
|
---
|
|
|
|
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
|
2020-03-04 05:49:18 +01:00
|
|
|
index 592c607..deac695 100644
|
2019-10-30 01:13:13 +01:00
|
|
|
--- 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
|
2020-03-04 05:49:18 +01:00
|
|
|
index 812141b..f17f1aa 100644
|
2019-10-30 01:13:13 +01:00
|
|
|
--- 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}
|
|
|
|
--
|
2020-03-04 05:49:18 +01:00
|
|
|
2.25.0
|
2019-10-30 01:13:13 +01:00
|
|
|
|