Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/menu
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2022-05-17 10:06:37 +0200
committerGitHub <noreply@github.com>2022-05-17 10:06:37 +0200
commit3d102854a7ad31659f65961966665f8c975f8d71 (patch)
treea769a402839bf34a802c1b597320fb355e207e7b /archinstall/lib/menu
parent4e39bfb5638598b81829752f22beb56cb0c095e6 (diff)
Reworking select_encrypted_partitions() to use the new Menu system, (#1201)
* Reworking select_encrypted_partitions() to use the new Menu system, and allow granularity. * Listing partitions and enabling a index selection. Also when selecting 'delete all partitions' wipe=True will get set on the blockdevice now. Otherwise the new partitions won't be able to be created without deleting them first. * flake8 fix * Removed old select_encrypted_partitions()
Diffstat (limited to 'archinstall/lib/menu')
-rw-r--r--archinstall/lib/menu/global_menu.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/archinstall/lib/menu/global_menu.py b/archinstall/lib/menu/global_menu.py
index f0f327ee..963766a2 100644
--- a/archinstall/lib/menu/global_menu.py
+++ b/archinstall/lib/menu/global_menu.py
@@ -193,8 +193,15 @@ class GlobalMenu(GeneralMenu):
# 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(encrypted_partitions(storage['arguments'].get('disk_layouts', [])))) == 0:
- storage['arguments']['disk_layouts'] = select_encrypted_partitions(
- storage['arguments']['disk_layouts'], storage['arguments']['!encryption-password'])
+ for blockdevice in storage['arguments']['disk_layouts']:
+ for partition_index in select_encrypted_partitions(
+ title="Select which partitions to encrypt:",
+ partitions=storage['arguments']['disk_layouts'][blockdevice]['partitions']
+ ):
+
+ partition = storage['arguments']['disk_layouts'][blockdevice]['partitions'][partition_index]
+ partition['encrypted'] = True
+ partition['!password'] = storage['arguments']['!encryption-password']
def _install_text(self):
missing = len(self._missing_configs())