diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-28 20:46:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-28 21:34:23 +0200 |
commit | 1a2399e57d9f5943a508720aaddc87512a972378 (patch) | |
tree | 30c8d123cf5c4e2c9c1e393f28acd88f9c427086 | |
parent | 773ce3d89c25aa51b0fe9085bd0eb7ba5e50508b (diff) |
nspawn: when run as a service, don't ask machined for terminatin of ourselves
-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"); |