summaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2019-10-30 00:32:41 +0100
committerJes Sorensen <jsorensen@fb.com>2019-11-12 21:37:08 +0100
commit4ca799c581703d4d0ad840833c037c2fff088ca7 (patch)
tree137999bb393b979089645c89ebcc20d9bd7fe325 /systemd
parentmdcheck: when mdcheck_start is enabled, enable mdcheck_continue too. (diff)
downloadmdadm-4ca799c581703d4d0ad840833c037c2fff088ca7.tar.xz
mdadm-4ca799c581703d4d0ad840833c037c2fff088ca7.zip
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> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'systemd')
-rw-r--r--systemd/mdcheck_continue.service5
-rw-r--r--systemd/mdcheck_start.service4
2 files changed, 4 insertions, 5 deletions
diff --git a/systemd/mdcheck_continue.service b/systemd/mdcheck_continue.service
index 592c6079..deac6954 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 812141bb..f17f1aae 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}