]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut.sh): avoid calling dfatal before dracut-logger is sourced
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 30 Mar 2022 07:27:17 +0000 (09:27 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 29 Apr 2022 21:49:23 +0000 (21:49 +0000)
dracut-logger is sourced in dracut-init, so any earlier calls to logger
functions before dracut-init is sourced fail.

Fix issue #1758

dracut.sh

index 94a3b068da29bbd99cb6dadf33d247aeb45b1b7e..524ac115fb89a8973a7d3c1c687a3d527a8e1edc 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1042,12 +1042,12 @@ if ! [[ $outfile ]]; then
     if [[ $uefi == "yes" ]]; then
         # shellcheck disable=SC2154
         if [[ -n $uefi_secureboot_key && -z $uefi_secureboot_cert ]] || [[ -z $uefi_secureboot_key && -n $uefi_secureboot_cert ]]; then
-            dfatal "Need 'uefi_secureboot_key' and 'uefi_secureboot_cert' both to be set."
+            printf "%s\n" "dracut: Need 'uefi_secureboot_key' and 'uefi_secureboot_cert' both to be set." >&2
             exit 1
         fi
 
         if [[ -n $uefi_secureboot_key && -n $uefi_secureboot_cert ]] && ! command -v sbsign &> /dev/null; then
-            dfatal "Need 'sbsign' to create a signed UEFI executable"
+            printf "%s\n" "dracut: Need 'sbsign' to create a signed UEFI executable." >&2
             exit 1
         fi