mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-25 21:45:11 +03:00
helpers: mount: quieter umount
Only print the root dir not all child mountpoints. Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
parent
4b534bb6da
commit
a707a3003d
1 changed files with 5 additions and 2 deletions
|
@ -101,9 +101,12 @@ def umount_all_list(prefix: Path, source: Path = Path("/proc/mounts")) -> list[P
|
|||
|
||||
def umount_all(folder: Path) -> None:
|
||||
"""Umount all folders that are mounted inside a given folder."""
|
||||
for mountpoint in umount_all_list(folder):
|
||||
all_mountpoints = umount_all_list(folder)
|
||||
if all_mountpoints:
|
||||
pmb.logging.info(f"% umount -R {folder}")
|
||||
|
||||
for mountpoint in all_mountpoints:
|
||||
if mountpoint.name != "binfmt_misc":
|
||||
pmb.logging.info(f"% umount {mountpoint}")
|
||||
sandbox.umount2(str(mountpoint), sandbox.MNT_DETACH)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue