Bug#964967: systemd: ExecStartPost executed even if ExecStart fails immediately

Michael Biebl biebl at debian.org
Mon Jul 13 17:25:20 BST 2020


Am 13.07.20 um 17:49 schrieb Michael Biebl:
> Am 13.07.20 um 17:04 schrieb Drexl Johannes:
>> Package: systemd
>> Version: 241-7~deb10u4
>> Severity: normal
>>
>> Dear Maintainer,
>>
>> tests on systemd environment variables under certain conditions got me puzzled,
>> and I guess this would be considered a bug.
>>
>> A systemd service will execute all ExecStartPost statements, even if the 
>> corresponding service configured with ExecStart has bailed out with error code.
>> One can test it with a [Service] section like that:
>>
>> Type=exec
> 
> If you want this behaviour, use Type=oneshot, not Type=exec

I.e. with Type=exec, systemd will not wait until the program specified
in ExecStart= has terminated (and evaluates its exit code) before it
proceeds executing the next command.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20200713/732c1c2e/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list