From a14604a1b642e41e53b09df7b9b0eabd684045a0 Mon Sep 17 00:00:00 2001 From: Werner Llácer Date: Mon, 25 Apr 2022 08:57:49 +0200 Subject: Created a routine to check if a partition includes a certain mountpoint (#1069) For a btrfs volume with a subvolume to be mounted on /, we will not generate a keyfile anymore --- archinstall/lib/user_interaction/partitioning_conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archinstall/lib/user_interaction/partitioning_conf.py') diff --git a/archinstall/lib/user_interaction/partitioning_conf.py b/archinstall/lib/user_interaction/partitioning_conf.py index a1abd732..734bbe87 100644 --- a/archinstall/lib/user_interaction/partitioning_conf.py +++ b/archinstall/lib/user_interaction/partitioning_conf.py @@ -6,6 +6,7 @@ from ..menu import Menu from ..output import log from ..disk.validators import fs_types +from ..disk.helpers import has_mountpoint if TYPE_CHECKING: from ..disk import BlockDevice @@ -298,7 +299,7 @@ def manage_new_and_existing_partitions(block_device: 'BlockDevice') -> Dict[str, elif task == set_btrfs_subvolumes: from .subvolume_config import SubvolumeList - + # TODO get preexisting partitions title = _('{}\n\nSelect which partition to set subvolumes on').format(current_layout) partition = select_partition(title, block_device_struct["partitions"],filter=lambda x:True if x.get('filesystem',{}).get('format') == 'btrfs' else False) @@ -325,7 +326,7 @@ def select_encrypted_partitions(block_devices: dict, password: str) -> dict: partition['encrypted'] = True partition['!password'] = password - if partition['mountpoint'] != '/': + if not has_mountpoint(partition,'/'): # Tell the upcoming steps to generate a key-file for non root mounts. partition['generate-encryption-key-file'] = True -- cgit v1.2.3-70-g09d2