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
See man systemd.service
>            •   The exec type is similar to simple, but the service manager 
> will consider the unit started immediately after the main service binary has 
> been executed. The service manager will delay starting of follow-up units 
> until that point. (Or in other
>                words: simple proceeds with further jobs right after fork() 
> returns, while exec will not proceed before both fork() and execve() in the 
> service process succeeded.) Note that this means systemctl start command 
> lines for exec services will report
>                failure when the service's binary cannot be invoked 
> successfully (for example because the selected User= doesn't exist, or the 
> service binary is missing).

Afaics, everything is working as documented

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to