From b4edf5219805e48be1b703420fc2deddbf936cdd Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 12 Apr 2024 21:55:26 +0200 Subject: [PATCH] [bootloader] Avoid indirection through shell There's no need to run the shell to take apart the arguments to grep. --- src/modules/bootloader/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 6fe01f8bc..d09508fae 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -142,8 +142,7 @@ def get_kernel_params(uuid): has_plymouth = have_program_in_target("plymouth") has_dracut = have_program_in_target("dracut") - uses_systemd_hook = libcalamares.utils.target_env_call(["sh", "-c", - "grep -q \"^HOOKS.*systemd\" /etc/mkinitcpio.conf"]) == 0 + uses_systemd_hook = libcalamares.utils.target_env_call(["/usr/bin/grep", "-q", "^HOOKS.*systemd", "/etc/mkinitcpio.conf"]) == 0 use_systemd_naming = has_dracut or uses_systemd_hook # If plymouth installed, add splash screen parameter early