summaryrefslogtreecommitdiff
path: root/src/core/shutdown.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-08-10 11:02:03 -0400
committerLennart Poettering <lennart@poettering.net>2012-08-10 17:59:33 +0200
commit4bfa638d43c05e8db052cd55818765bb3575a405 (patch)
treeac91645a5a8df206365422730fbb382ed211b882 /src/core/shutdown.c
parent8e4e8df5ea6bdb93ed67a0340ac711acc39d5193 (diff)
shutdown: recursively mark root as private before pivot
Because root is now recursively marked as shared on bootup, we need to recursively mark root as private. This prevents a pivot_root failure on shutdown: Cannot finalize remaining file systems and devices, giving up. pivot failed: Invalid argument
Diffstat (limited to 'src/core/shutdown.c')
-rw-r--r--src/core/shutdown.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index 105a60454..0b7cbd8d3 100644
--- a/src/core/shutdown.c
+++ b/src/core/shutdown.c
@@ -109,7 +109,7 @@ static int pivot_to_new_root(void) {
It works for pivot_root, but the ref count for the root device
is not decreasing :-/
*/
- if (mount(NULL, "/", NULL, MS_PRIVATE, NULL) < 0) {
+ if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0) {
log_error("Failed to make \"/\" private mount %m");
return -errno;
}