Modified last few places where password gets set.
This commit is contained in:
parent
df59809206
commit
9fe4dbc50e
|
|
@ -176,7 +176,9 @@ class Installer:
|
||||||
for mountpoint in sorted(mountpoints.keys()):
|
for mountpoint in sorted(mountpoints.keys()):
|
||||||
if mountpoints[mountpoint]['encrypted']:
|
if mountpoints[mountpoint]['encrypted']:
|
||||||
loopdev = storage.get('ENC_IDENTIFIER', 'ai') + 'loop'
|
loopdev = storage.get('ENC_IDENTIFIER', 'ai') + 'loop'
|
||||||
password = mountpoints[mountpoint]['password']
|
if not (password := mountpoints[mountpoint].get('!password', None)):
|
||||||
|
raise RequirementError(f"Missing mountpoint {mountpoint} encryption password in layout: {mountpoints[mountpoint]}")
|
||||||
|
|
||||||
with luks2(mountpoints[mountpoint]['device_instance'], loopdev, password, auto_unmount=False) as unlocked_device:
|
with luks2(mountpoints[mountpoint]['device_instance'], loopdev, password, auto_unmount=False) as unlocked_device:
|
||||||
unlocked_device.mount(f"{self.target}{mountpoint}")
|
unlocked_device.mount(f"{self.target}{mountpoint}")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ def generic_multi_select(options, text="Select one or more of the options above
|
||||||
def select_encrypted_partitions(block_devices :dict, password :str) -> dict:
|
def select_encrypted_partitions(block_devices :dict, password :str) -> dict:
|
||||||
root = find_partition_by_mountpoint(block_devices, '/')
|
root = find_partition_by_mountpoint(block_devices, '/')
|
||||||
root['encrypted'] = True
|
root['encrypted'] = True
|
||||||
root['password'] = password
|
root['!password'] = password
|
||||||
|
|
||||||
return block_devices
|
return block_devices
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue