]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: when run as a service, don't ask machined for terminatin of ourselves
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Apr 2015 18:46:33 +0000 (20:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 28 Apr 2015 19:34:23 +0000 (21:34 +0200)
src/nspawn/nspawn.c

index 29652e00e5b5026a00567739d13ba3a610c7456b..05d2c71e4503da4a4245b216be44fc4bf78f39b1 100644 (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");