Don't offer to encrypt /boot, exlude it from the set available to the user (#1273)
* WIP: Don't offer to encrypt /boot * This filter might work * Ref: https://github.com/archlinux/archinstall/blob/master/archinstall/lib/storage.py * Use list comprehension * I wonder if I can use this filter_ argument that exists already * flake8 fix * Show index
This commit is contained in:
parent
121e077b4e
commit
b2f85889a7
|
|
@ -206,8 +206,9 @@ class GlobalMenu(GeneralMenu):
|
||||||
for blockdevice in storage['arguments']['disk_layouts']:
|
for blockdevice in storage['arguments']['disk_layouts']:
|
||||||
if storage['arguments']['disk_layouts'][blockdevice].get('partitions'):
|
if storage['arguments']['disk_layouts'][blockdevice].get('partitions'):
|
||||||
for partition_index in select_encrypted_partitions(
|
for partition_index in select_encrypted_partitions(
|
||||||
title="Select which partitions to encrypt:",
|
title=_('Select which partitions to encrypt:'),
|
||||||
partitions=storage['arguments']['disk_layouts'][blockdevice]['partitions']
|
partitions=storage['arguments']['disk_layouts'][blockdevice]['partitions'],
|
||||||
|
filter_=(lambda p: p['mountpoint'] != '/boot')
|
||||||
):
|
):
|
||||||
|
|
||||||
partition = storage['arguments']['disk_layouts'][blockdevice]['partitions'][partition_index]
|
partition = storage['arguments']['disk_layouts'][blockdevice]['partitions'][partition_index]
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ def select_encrypted_partitions(
|
||||||
|
|
||||||
# show current partition layout:
|
# show current partition layout:
|
||||||
if len(partitions):
|
if len(partitions):
|
||||||
title += current_partition_layout(partitions) + '\n'
|
title += current_partition_layout(partitions, with_idx=True) + '\n'
|
||||||
|
|
||||||
choice = Menu(title, partition_indexes, multi=multiple).run()
|
choice = Menu(title, partition_indexes, multi=multiple).run()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue