[grubcfg] Compare integers to integers, not strings.
target_env_call returns an integer, so do not compare its result to the string "0".
This commit is contained in:
parent
a279eaf4fa
commit
9d2291b74e
@ -45,7 +45,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
|
|
||||||
cryptdevice_params = []
|
cryptdevice_params = []
|
||||||
|
|
||||||
if dracut_bin == "0":
|
if dracut_bin == 0:
|
||||||
for partition in partitions:
|
for partition in partitions:
|
||||||
if partition["fs"] == "linuxswap":
|
if partition["fs"] == "linuxswap":
|
||||||
swap_uuid = partition["uuid"]
|
swap_uuid = partition["uuid"]
|
||||||
@ -78,7 +78,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||||||
if swap_uuid:
|
if swap_uuid:
|
||||||
kernel_params.append("resume=UUID={!s}".format(swap_uuid))
|
kernel_params.append("resume=UUID={!s}".format(swap_uuid))
|
||||||
|
|
||||||
if dracut_bin == "0" and swap_outer_uuid:
|
if dracut_bin == 0 and swap_outer_uuid:
|
||||||
kernel_params.append("rd.luks.uuid={!s}".format(swap_outer_uuid))
|
kernel_params.append("rd.luks.uuid={!s}".format(swap_outer_uuid))
|
||||||
|
|
||||||
distributor_line = "GRUB_DISTRIBUTOR='{!s}'".format(distributor_replace)
|
distributor_line = "GRUB_DISTRIBUTOR='{!s}'".format(distributor_replace)
|
||||||
|
Loading…
Reference in New Issue
Block a user