diff options
author | John Estabrook <jestabro@vyos.io> | 2024-02-05 22:38:04 -0600 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-06 17:01:13 +0000 |
commit | 1eb17f79bf3ebf29c4caf7e09734cd3a6346cdd2 (patch) | |
tree | da7c86ddb16ea58b213e5e80d83239f4f18ed791 /src/op_mode | |
parent | b10d1c0bd60d3497417e124c6d5e0f5291a56853 (diff) | |
download | vyos-1x-1eb17f79bf3ebf29c4caf7e09734cd3a6346cdd2.tar.gz vyos-1x-1eb17f79bf3ebf29c4caf7e09734cd3a6346cdd2.zip |
image-tools: T6016: wait for umount in cleanup function
(cherry picked from commit d80530c48a78dfeb55293494a257f6234b0ef76d)
Diffstat (limited to 'src/op_mode')
-rwxr-xr-x | src/op_mode/image_installer.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py index 0564f41bc..5eb5441f7 100755 --- a/src/op_mode/image_installer.py +++ b/src/op_mode/image_installer.py @@ -591,6 +591,8 @@ def cleanup(mounts: list[str] = [], remove_items: list[str] = []) -> None: print('Unmounting target filesystems') for mountpoint in mounts: disk.partition_umount(mountpoint) + for mountpoint in mounts: + disk.wait_for_umount(mountpoint) if remove_items: print('Removing temporary files') for remove_item in remove_items: @@ -598,7 +600,8 @@ def cleanup(mounts: list[str] = [], remove_items: list[str] = []) -> None: if Path(remove_item).is_file(): Path(remove_item).unlink() if Path(remove_item).is_dir(): - rmtree(remove_item) + rmtree(remove_item, ignore_errors=True) + def cleanup_raid(details: raid.RaidDetails) -> None: efiparts = [] |