Compare commits

..

2 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek a3558e7952 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.
2020-03-05 04:49:37 +09:00
Yu Watanabe df883de98a pid1, nspawn: voidify loopback_setup() 2020-03-04 14:18:55 +01:00
3 changed files with 3 additions and 3 deletions

View File

@ -1930,7 +1930,7 @@ static int initialize_runtime(
status_welcome();
hostname_setup();
machine_id_setup(NULL, arg_machine_id, NULL);
loopback_setup();
(void) loopback_setup();
bump_unix_max_dgram_qlen();
bump_file_max_and_nr_open();
test_usr();

View File

@ -3000,7 +3000,7 @@ static int inner_child(
return log_error_errno(errno, "setsid() failed: %m");
if (arg_private_network)
loopback_setup();
(void) loopback_setup();
if (arg_expose_ports) {
r = expose_port_send_rtnl(rtnl_socket);

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