From 5a4bf02ff57e4dd3453f2b868c72fe45f60033a3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 21 Aug 2014 16:21:26 +0200 Subject: use the switch_root function in shutdown removes code duplication also move switch-root to shared --- src/core/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/main.c') 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)); } -- cgit v1.2.3-54-g00ecf