Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-14 15:22:25 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-14 15:22:25 +0100
commitb495b3328e81983e88f9ada072916d16e897910c (patch)
treed91a8ac6b617adcffde63fc00416982d75dc9a5d
parentdabaebe2216fbc53a00c9c3580b5ca0aa2e515e1 (diff)
Added error handling for unlocking an old partition (autodetect feature).
-rw-r--r--examples/guided.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 4e6aaf34..40ac7ca8 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -91,7 +91,11 @@ def ask_user_questions():
new_filesystem = input(f"Enter a valid filesystem for {partition} (leave blank for {partition.filesystem}): ").strip(' ')
if len(new_filesystem) <= 0:
if partition.encrypted and partition.filesystem == 'crypto_LUKS':
- if (autodetected_filesystem := partition.detect_inner_filesystem(archinstall.arguments.get('!encryption-password', None))):
+ old_password = archinstall.arguments.get('!encryption-password', None)
+ if not old_password:
+ old_password = input(f'Enter the old encryption password for {partition}: ')
+
+ if (autodetected_filesystem := partition.detect_inner_filesystem(old_password)):
new_filesystem = autodetected_filesystem
else:
archinstall.log(f"Could not auto-detect the filesystem inside the encrypted volume.", fg='red')