nspawn: when run as a service, don't ask machined for terminatin of ourselves

This commit is contained in:
Lennart Poettering 2015-04-28 20:46:33 +02:00
parent 773ce3d89c
commit 1a2399e57d

View file

@ -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");