[systemd-commits] src/core
Michal Sekletar
msekleta at kemper.freedesktop.org
Mon Oct 27 04:26:18 PDT 2014
src/core/shutdown.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d89b5fed9ea5d9ec293585cb85bb27b56ea6ac9c
Author: Michal Sekletar <msekleta at redhat.com>
Date: Tue Oct 21 18:38:42 2014 +0200
shutdown: do final unmounting only if not running inside the container
If we run in the container then we run in a mount namespace. If namespace dies
then kernel should do unmounting for us, hence we skip unmounting in containers.
Also, it may be the case that we no longer have capability to do umount,
because we are running in the unprivileged container.
See: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023536.html
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index d361cbe..20cf526 100644
--- a/src/core/shutdown.c
+++ b/src/core/shutdown.c
@@ -207,7 +207,7 @@ int main(int argc, char *argv[]) {
in_container = detect_container(NULL) > 0;
- need_umount = true;
+ need_umount = !in_container;
need_swapoff = !in_container;
need_loop_detach = !in_container;
need_dm_detach = !in_container;
More information about the systemd-commits
mailing list