nspawn: when run as a service, don't ask machined for terminatin of ourselves
This commit is contained in:
parent
773ce3d89c
commit
1a2399e57d
|
@ -2081,6 +2081,11 @@ static int terminate_machine(pid_t pid) {
|
|||
if (!arg_register)
|
||||
return 0;
|
||||
|
||||
/* If we are reusing the unit, then just exit, systemd will do
|
||||
* the right thing when we exit. */
|
||||
if (arg_keep_unit)
|
||||
return 0;
|
||||
|
||||
r = sd_bus_default_system(&bus);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to open system bus: %m");
|
||||
|
|
Loading…
Reference in a new issue