Revert "core: Propagate condition failed state to triggering units."

This reverts commit 12ab94a1e4.
This commit is contained in:
Daan De Meyer
2021-12-17 19:39:29 +01:00
parent 415d7d774a
commit 40f41f34d4
13 changed files with 28 additions and 72 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
ConditionPathExists=/tmp/nonexistent
ConditionPathExists=!/tmp/nonexistent
[Service]
ExecStart=true
+1 -1
View File
@@ -12,5 +12,5 @@ ExecStart=-nc -w20 -U /run/test.ctl
# systemd enough time even on slower machines, to reach the trigger limit.
ExecStart=sleep 10
ExecStart=sh -x -c 'test "$(systemctl show test10.socket -P ActiveState)" = failed'
ExecStart=sh -x -c 'test "$(systemctl show test10.socket -P Result)" = service-condition-failed'
ExecStart=sh -x -c 'test "$(systemctl show test10.socket -P Result)" = trigger-limit-hit'
ExecStart=sh -x -c 'echo OK >/testok'
+4 -4
View File
@@ -8,10 +8,10 @@ Type=oneshot
ExecStart=rm -f /tmp/nonexistent
ExecStart=systemctl start test63.path
ExecStart=touch /tmp/test63
# Make sure systemd has sufficient time to hit the start limit for test63.service.
ExecStart=sleep 2
# Ensure both the service and the corresponding path unit go inactive due to the failed condition check.
ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = inactive'
ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = success'
ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = failed'
ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = start-limit-hit'
ExecStart=sh -x -c 'test "$(systemctl show test63.path -P ActiveState)" = failed'
ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = unit-condition-failed'
ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = unit-start-limit-hit'
ExecStart=sh -x -c 'echo OK >/testok'