From 073196822a4ce5c1254ef8a85acb84ddc84a4a30 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 4 Sep 2017 06:42:51 -0400 Subject: [PATCH] Make check for dracut more readable --- src/modules/grubcfg/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py index 59497cf03..8acacbb72 100644 --- a/src/modules/grubcfg/main.py +++ b/src/modules/grubcfg/main.py @@ -40,6 +40,8 @@ def modify_grub_default(partitions, root_mount_point, distributor): dracut_bin = libcalamares.utils.target_env_call( ["sh", "-c", "which dracut"] ) + have_dracut = dracut_bin == 0 # Shell exit value 0 means success + use_splash = "" swap_uuid = "" swap_outer_uuid = "" @@ -50,7 +52,7 @@ def modify_grub_default(partitions, root_mount_point, distributor): cryptdevice_params = [] - if dracut_bin == 0: + if have_dracut: for partition in partitions: if partition["fs"] == "linuxswap": swap_uuid = partition["uuid"]