Skip to content

Commit

Permalink
Fix _mount_luks_partition() (#2838)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored Nov 17, 2024
1 parent 80ad332 commit 68e2d8c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,14 @@ def _mount_lvm_vol(self, volume: disk.LvmVolume) -> None:
self._mount_btrfs_subvol(volume.dev_path, volume.btrfs_subvols, volume.mount_options)

def _mount_luks_partition(self, part_mod: disk.PartitionModification, luks_handler: Luks2) -> None:
if part_mod.fs_type != disk.FilesystemType.Btrfs:
if part_mod.mountpoint and luks_handler.mapper_dev:
target = self.target / part_mod.relative_mountpoint
disk.device_handler.mount(luks_handler.mapper_dev, target, options=part_mod.mount_options)
if not luks_handler.mapper_dev:
return None

if part_mod.fs_type == disk.FilesystemType.Btrfs and luks_handler.mapper_dev:
if part_mod.fs_type == disk.FilesystemType.Btrfs and part_mod.btrfs_subvols:
self._mount_btrfs_subvol(luks_handler.mapper_dev, part_mod.btrfs_subvols, part_mod.mount_options)
elif part_mod.mountpoint:
target = self.target / part_mod.relative_mountpoint
disk.device_handler.mount(luks_handler.mapper_dev, target, options=part_mod.mount_options)

def _mount_luks_volume(self, volume: disk.LvmVolume, luks_handler: Luks2) -> None:
if volume.fs_type != disk.FilesystemType.Btrfs:
Expand Down

0 comments on commit 68e2d8c

Please sign in to comment.