units: do not ignore return value from systemd --user

This minus has been there since the unit was added in
d42d27ead9. I think the idea was not cause things
to fail if the user instance doesn't work. But ignoring the return value
doesn't seem to be the right way to approach the problem. In particular, if
the program fails to run, we'll get a bogus fail state, see
https://bugzilla.redhat.com/show_bug.cgi?id=1727895#c1:

with the minus:
$ systemctl start user@1002
Job for user@1002.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status user@1002.service" and "journalctl -xe" for details.

without the minus:
$ systemctl start user@1002
Job for user@1002.service failed because the control process exited with error code.
See "systemctl status user@1002.service" and "journalctl -xe" for details.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-03-04 14:21:37 +01:00 committed by Yu Watanabe
parent df883de98a
commit a3558e7952
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ IgnoreOnIsolate=yes
User=%i
PAMName=systemd-user
Type=notify
ExecStart=-@rootlibexecdir@/systemd --user
ExecStart=@rootlibexecdir@/systemd --user
Slice=user-%i.slice
KillMode=mixed
Delegate=pids memory