diff options
Diffstat (limited to 'src/core/main.c')
-rw-r--r-- | src/core/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/main.c b/src/core/main.c index 95ab40fffc..64c2b3f3a1 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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)); } |