summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vpn_openconnect.py2
-rwxr-xr-xsrc/op_mode/image_installer.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/conf_mode/vpn_openconnect.py b/src/conf_mode/vpn_openconnect.py
index 421ac6997..08e4fc6db 100755
--- a/src/conf_mode/vpn_openconnect.py
+++ b/src/conf_mode/vpn_openconnect.py
@@ -91,7 +91,7 @@ def verify(ocserv):
if not ocserv["authentication"]['radius']['server']:
raise ConfigError('Openconnect authentication mode radius requires at least one RADIUS server')
if "local" in ocserv["authentication"]["mode"]:
- if not ocserv["authentication"]["local_users"]:
+ if not ocserv.get("authentication", {}).get("local_users"):
raise ConfigError('openconnect mode local required at least one user')
if not ocserv["authentication"]["local_users"]["username"]:
raise ConfigError('openconnect mode local required at least one user')
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py
index 501e9b804..d677c2cf8 100755
--- a/src/op_mode/image_installer.py
+++ b/src/op_mode/image_installer.py
@@ -599,6 +599,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:
@@ -606,7 +608,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 = []