diff options
author | Christian Breunig <christian@breunig.cc> | 2024-02-06 18:15:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 18:15:01 +0100 |
commit | a0a18c4fa02c9d8aae30950720362d599a8ba6cd (patch) | |
tree | 57d270d1ad084a5bfcc52d2b0c72a252dc92c9f6 /src/op_mode/image_installer.py | |
parent | 5f61a51c8f5a647ff0eac4563a77cc58bf549c15 (diff) | |
parent | 1eb17f79bf3ebf29c4caf7e09734cd3a6346cdd2 (diff) | |
download | vyos-1x-a0a18c4fa02c9d8aae30950720362d599a8ba6cd.tar.gz vyos-1x-a0a18c4fa02c9d8aae30950720362d599a8ba6cd.zip |
Merge pull request #2948 from vyos/mergify/bp/sagitta/pr-2941
image-tools: T6016: wait for umount in cleanup function (backport #2941)
Diffstat (limited to 'src/op_mode/image_installer.py')
-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 = [] |