From 21602fe0710183b018307114ad97de6bdf4053f1 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 5 Oct 2018 18:17:24 -0700 Subject: [PATCH] Recursively unmount We always want to unmount anything left on the root mountpoint. Just use the --recursive switch from umount. --- mkosi | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mkosi b/mkosi index e7a1031d5..61c6a95ce 100755 --- 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): -- 2.47.2