Don't enable grub password query if /boot is on unencrypted partition
This commit is contained in:
parent
84558333bf
commit
3eae98eac3
@ -90,6 +90,12 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
swap_outer_uuid = ""
|
swap_outer_uuid = ""
|
||||||
swap_outer_mappername = None
|
swap_outer_mappername = None
|
||||||
no_save_default = False
|
no_save_default = False
|
||||||
|
unencrypted_separate_boot = False
|
||||||
|
|
||||||
|
for partition in partitions:
|
||||||
|
if (partition["mountPoint"] == "/boot"
|
||||||
|
and "luksMapperName" not in partition):
|
||||||
|
unencrypted_separate_boot = True
|
||||||
|
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
if partition["mountPoint"] in ("/", "/boot") and partition["fs"] in ("btrfs", "f2fs"):
|
if partition["mountPoint"] in ("/", "/boot") and partition["fs"] in ("btrfs", "f2fs"):
|
||||||
@ -239,7 +245,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
if not have_distributor_line:
|
if not have_distributor_line:
|
||||||
lines.append(distributor_line)
|
lines.append(distributor_line)
|
||||||
|
|
||||||
if cryptdevice_params:
|
if cryptdevice_params and not unencrypted_separate_boot:
|
||||||
lines.append("GRUB_ENABLE_CRYPTODISK=y")
|
lines.append("GRUB_ENABLE_CRYPTODISK=y")
|
||||||
|
|
||||||
with open(default_grub, 'w') as grub_file:
|
with open(default_grub, 'w') as grub_file:
|
||||||
|
Loading…
Reference in New Issue
Block a user