diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 00c7e823d9f..d7ca9bf8425 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -463,6 +463,15 @@ signal, etc.), the unit will be considered failed (and remaining commands will be skipped). Exit code of 0 or those matching SuccessExitStatus= will continue execution to the next commands. + Note that an ExecCondition= skip is not equivalent to a + unit-level Condition…= or Assert…= check failing. Because + ExecCondition= runs as part of the activation transition, a skip causes the unit to + transition from active to inactive, and consequently + SuccessAction= (see + systemd.unit5) will be + honored. By contrast, Condition…= directives in the [Unit] section + prevent activation entirely and therefore do not trigger SuccessAction=. + The same recommendations about not running long-running processes in ExecStartPre= also applies to ExecCondition=. ExecCondition= will also run the commands in ExecStopPost=, as part of stopping the service, in the case of any non-zero or abnormal diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 4e4b1714c0d..c84a365a96b 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1108,6 +1108,16 @@ allowed. In user mode, only , , and are allowed. Both options default to . + These actions are tied to the unit's state transitions and fire only when the unit actually + transitions out of an active or activating state. As a + consequence, Condition…= and Assert…= directives that fail do + not trigger SuccessAction= or + FailureAction=: they prevent activation in the first place, so no state transition + occurs. By contrast, the ExecCondition= directive in + systemd.service5 + runs as part of activation, so an ExecCondition= skip will + trigger SuccessAction=. + If is set, no action will be triggered. causes a reboot following the normal shutdown procedure (i.e. equivalent to systemctl reboot). causes a forced reboot which will terminate all