From: Lucas De Marchi Date: Sat, 6 Oct 2018 01:17:24 +0000 (-0700) Subject: Recursively unmount X-Git-Tag: v5~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F264%2Fhead;p=thirdparty%2Fmkosi.git Recursively unmount We always want to unmount anything left on the root mountpoint. Just use the --recursive switch from umount. --- 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):