parent
3450f0b963
commit
fcc23b98d2
@ -111,7 +111,7 @@ def create_systemd_boot_conf(uuid, conf_path, kernel_line):
|
|||||||
# - encrypted root sets cryptdevice_params
|
# - encrypted root sets cryptdevice_params
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
has_luks = "luksMapperName" in partition
|
has_luks = "luksMapperName" in partition
|
||||||
if partition["fs"].lower().lstrip("-") == "linuxswap" and not has_luks:
|
if partition["fs"].lower().strip("-") == "linuxswap" and not has_luks:
|
||||||
swap_uuid = partition["uuid"]
|
swap_uuid = partition["uuid"]
|
||||||
|
|
||||||
if partition["mountPoint"] == "/" and has_luks:
|
if partition["mountPoint"] == "/" and has_luks:
|
||||||
|
@ -60,10 +60,10 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
if have_dracut:
|
if have_dracut:
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
has_luks = "luksMapperName" in partition
|
has_luks = "luksMapperName" in partition
|
||||||
if partition["fs"].lower().lstrip("-") == "linuxswap" and not has_luks:
|
if partition["fs"].lower().strip("-") == "linuxswap" and not has_luks:
|
||||||
swap_uuid = partition["uuid"]
|
swap_uuid = partition["uuid"]
|
||||||
|
|
||||||
if (partition["fs"].lower().lstrip("-") == "linuxswap" and has_luks):
|
if (partition["fs"].lower().strip("-") == "linuxswap" and has_luks):
|
||||||
swap_outer_uuid = partition["luksUuid"]
|
swap_outer_uuid = partition["luksUuid"]
|
||||||
swap_outer_mappername = partition["luksMapperName"]
|
swap_outer_mappername = partition["luksMapperName"]
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
else:
|
else:
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
has_luks = "luksMapperName" in partition
|
has_luks = "luksMapperName" in partition
|
||||||
if partition["fs"].lower().lstrip("-") == "linuxswap" and not has_luks:
|
if partition["fs"].lower().strip("-") == "linuxswap" and not has_luks:
|
||||||
swap_uuid = partition["uuid"]
|
swap_uuid = partition["uuid"]
|
||||||
|
|
||||||
if (partition["mountPoint"] == "/" and has_luks):
|
if (partition["mountPoint"] == "/" and has_luks):
|
||||||
|
@ -114,7 +114,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
|
|||||||
hooks.append("plymouth")
|
hooks.append("plymouth")
|
||||||
|
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
if partition["fs"].lower().lstrip("-") == "linuxswap":
|
if partition["fs"].lower().strip("-") == "linuxswap":
|
||||||
swap_uuid = partition["uuid"]
|
swap_uuid = partition["uuid"]
|
||||||
if "luksMapperName" in partition:
|
if "luksMapperName" in partition:
|
||||||
openswap_hook = True
|
openswap_hook = True
|
||||||
|
@ -47,7 +47,7 @@ def run():
|
|||||||
luks_root_device = partition["device"]
|
luks_root_device = partition["device"]
|
||||||
luks_root_passphrase = partition["luksPassphrase"]
|
luks_root_passphrase = partition["luksPassphrase"]
|
||||||
elif "luksMapperName" in partition and\
|
elif "luksMapperName" in partition and\
|
||||||
(partition["mountPoint"] or partition["fs"].lower().lstrip("-") == "linuxswap"):
|
(partition["mountPoint"] or partition["fs"].lower().strip("-") == "linuxswap"):
|
||||||
additional_luks_devices.append((partition["device"],
|
additional_luks_devices.append((partition["device"],
|
||||||
partition["luksPassphrase"]))
|
partition["luksPassphrase"]))
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ def write_openswap_conf(partitions, root_mount_point, openswap_conf_path):
|
|||||||
mountable_keyfile_device = ""
|
mountable_keyfile_device = ""
|
||||||
|
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
if partition["fs"].lower().lstrip("-") == "linuxswap" and "luksMapperName" in partition:
|
if partition["fs"].lower().strip("-") == "linuxswap" and "luksMapperName" in partition:
|
||||||
swap_outer_uuid = partition["luksUuid"]
|
swap_outer_uuid = partition["luksUuid"]
|
||||||
swap_mapper_name = partition["luksMapperName"]
|
swap_mapper_name = partition["luksMapperName"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user