Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 14cbe0a1..4136ca6e 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -87,11 +87,11 @@ def ask_user_questions():
if (passwd := archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): ')):
archinstall.arguments['!encryption-password'] = passwd
- # If no partitions was marked as encrypted (rare), but a password was supplied -
- # then we need to identify which partitions to encrypt. This will default to / (root) if only
- # root and boot are detected.
- if len(list(archinstall.encrypted_partitions(archinstall.storage['disk_layouts']))) == 0:
- archinstall.storage['disk_layouts'] = archinstall.select_encrypted_partitions(archinstall.storage['disk_layouts'])
+ if archinstall.arguments['harddrives'] and archinstall.arguments.get('!encryption-password', None):
+ # If no partitions was marked as encrypted, but a password was supplied and we have some disks to format..
+ # Then we need to identify which partitions to encrypt. This will default to / (root).
+ if len(list(archinstall.encrypted_partitions(archinstall.storage['disk_layouts']))) == 0:
+ archinstall.storage['disk_layouts'] = archinstall.select_encrypted_partitions(archinstall.storage['disk_layouts'], archinstall.arguments['!encryption-password'])
# Ask which boot-loader to use (will only ask if we're in BIOS (non-efi) mode)
if not archinstall.arguments.get("bootloader", None):