chiark / gitweb /
udev: timeout - warn after a third of the timeout before killing
[elogind.git] / src / core / main.c
index 95ab40fffc09135e72c4031ce7503d5f24da60b3..64c2b3f3a143d4248522bb2339689d28e77d1474 100644 (file)
@@ -1853,8 +1853,8 @@ finish:
                          * deserializing. */
                         broadcast_signal(SIGTERM, false, true);
 
-                        /* And switch root */
-                        r = switch_root(switch_root_dir);
+                        /* And switch root with MS_MOVE, because we remove the old directory afterwards and detach it. */
+                        r = switch_root(switch_root_dir, "/mnt", true, MS_MOVE);
                         if (r < 0)
                                 log_error("Failed to switch root, ignoring: %s", strerror(-r));
                 }