diff options
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r-- | src/nspawn/nspawn.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 29652e00e5..05d2c71e45 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -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"); |