summaryrefslogtreecommitdiff
path: root/test/units/testsuite-51-repro-3.service
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2022-01-26 19:00:25 +0000
committerLuca Boccassi <luca.boccassi@microsoft.com>2022-01-26 19:02:11 +0000
commitabb99360d3317980fc8843f79b67c763cd4a9a2c (patch)
treefc567309bf3563caf97b4db430d020dc24e324b2 /test/units/testsuite-51-repro-3.service
parent9d3bb25b2da77d35d84e986dd71c5823958d6e67 (diff)
downloadsystemd-abb99360d3317980fc8843f79b67c763cd4a9a2c.tar.gz
core: do not restart a service with Restart=always when ExecCondition fails
When a Condition*= fails, and a service has Restart=always, the service is not restarted. Follow the same behaviour for ExecCondition= to avoid inconsistencies. Fixes #22257
Diffstat (limited to 'test/units/testsuite-51-repro-3.service')
-rw-r--r--test/units/testsuite-51-repro-3.service10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/units/testsuite-51-repro-3.service b/test/units/testsuite-51-repro-3.service
new file mode 100644
index 0000000000..c68f93d11d
--- /dev/null
+++ b/test/units/testsuite-51-repro-3.service
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+[Unit]
+Description=Issue 22257 Repro with Restart=always
+
+[Service]
+Type=simple
+Restart=always
+ExecCondition=/bin/false
+ExecStart=sleep 100
+RestartSec=1