Skip to content

Commit

Permalink
fix(dracut.sh): avoid calling dfatal before dracut-logger is sourced
Browse files Browse the repository at this point in the history
dracut-logger is sourced in dracut-init, so any earlier calls to logger
functions before dracut-init is sourced fail.

Fix issue #1758
  • Loading branch information
aafeijoo-suse authored and johannbg committed Apr 29, 2022
1 parent d0c6ab2 commit 012d7db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 012d7db

Please sign in to comment.