Added some error handling to disk encryption passwords.
This commit is contained in:
parent
40440e575c
commit
502968b579
|
|
@ -94,7 +94,7 @@ def ask_user_questions():
|
||||||
old_password = archinstall.arguments.get('!encryption-password', None)
|
old_password = archinstall.arguments.get('!encryption-password', None)
|
||||||
if not old_password:
|
if not old_password:
|
||||||
old_password = input(f'Enter the old encryption password for {partition}: ')
|
old_password = input(f'Enter the old encryption password for {partition}: ')
|
||||||
|
|
||||||
if (autodetected_filesystem := partition.detect_inner_filesystem(old_password)):
|
if (autodetected_filesystem := partition.detect_inner_filesystem(old_password)):
|
||||||
new_filesystem = autodetected_filesystem
|
new_filesystem = autodetected_filesystem
|
||||||
else:
|
else:
|
||||||
|
|
@ -134,8 +134,9 @@ def ask_user_questions():
|
||||||
|
|
||||||
# Get disk encryption password (or skip if blank)
|
# Get disk encryption password (or skip if blank)
|
||||||
if not archinstall.arguments.get('!encryption-password', None):
|
if not archinstall.arguments.get('!encryption-password', None):
|
||||||
archinstall.arguments['!encryption-password'] = archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): ')
|
if passwd := archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): '):
|
||||||
archinstall.arguments['harddrive'].encryption_password = archinstall.arguments['!encryption-password']
|
archinstall.arguments['!encryption-password'] = passwd
|
||||||
|
archinstall.arguments['harddrive'].encryption_password = archinstall.arguments['!encryption-password']
|
||||||
|
|
||||||
# Get the hostname for the machine
|
# Get the hostname for the machine
|
||||||
if not archinstall.arguments.get('hostname', None):
|
if not archinstall.arguments.get('hostname', None):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue