core: update setings on the unit and job as the result of ExecCondition=

Update ExecCondition= to set Unit->condition_result and return JOB_DONE
in the Job results  if the check fails so as to match the current behavior
of ConditionXYZ= w.r.t units/jobs dependency checks.

Fixes: #18207
This commit is contained in:
Anita Zhang
2021-01-22 17:41:13 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent f190ac486e
commit 42e6f54979
4 changed files with 11 additions and 12 deletions
-2
View File
@@ -2559,8 +2559,6 @@ static bool unit_process_job(Job *j, UnitActiveState ns, UnitNotifyFlags flags)
if (UNIT_IS_INACTIVE_OR_FAILED(ns)) {
if (ns == UNIT_FAILED)
result = JOB_FAILED;
else if (FLAGS_SET(flags, UNIT_NOTIFY_SKIP_CONDITION))
result = JOB_SKIPPED;
else
result = JOB_DONE;