]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Recursively unmount 264/head
authorLucas De Marchi <lucas.demarchi@intel.com>
Sat, 6 Oct 2018 01:17:24 +0000 (18:17 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Sat, 6 Oct 2018 01:17:24 +0000 (18:17 -0700)
We always want to unmount anything left on the root mountpoint. Just
use the --recursive switch from umount.

mkosi

diff --git a/mkosi b/mkosi
index e7a1031d5f8ad7d056444e3884f89c512e427d80..61c6a95ce8328dcb784056cf575976a614314ef2 100755 (executable)
--- a/mkosi
+++ b/mkosi
@@ -742,10 +742,6 @@ def mount_image(args, workspace, loopdev, root_dev, home_dev, srv_dev, root_read
         yield
     finally:
         with complete_step('Unmounting image'):
-
-            for d in ("home", "srv", "efi", "run", "tmp"):
-                umount(os.path.join(root, d))
-
             umount(root)
 
 @complete_step("Assigning hostname")
@@ -809,7 +805,7 @@ def mount_cache(args, workspace):
 
 def umount(where):
     # Ignore failures and error messages
-    run(["umount", "-n", where], stdout=DEVNULL, stderr=DEVNULL)
+    run(["umount", "--recursive", "-n", where], stdout=DEVNULL, stderr=DEVNULL)
 
 @complete_step('Setting up basic OS tree')
 def prepare_tree(args, workspace, run_build_script, cached):