From 642ace5882b996dbd89f84802dfc4e40066ce95e Mon Sep 17 00:00:00 2001 From: dalto Date: Wed, 30 Aug 2023 16:56:18 -0500 Subject: [PATCH] Fix fallback entry getting generated when NO_DRACUT_FALLBACK is true --- .../lib/kernel/install.d/90-loaderentry-fallback.install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/usr/lib/kernel/install.d/90-loaderentry-fallback.install b/src/usr/lib/kernel/install.d/90-loaderentry-fallback.install index e48aefd..ced01cd 100755 --- a/src/usr/lib/kernel/install.d/90-loaderentry-fallback.install +++ b/src/usr/lib/kernel/install.d/90-loaderentry-fallback.install @@ -28,6 +28,9 @@ INITRD_OPTIONS_SHIFT=4 [ "$KERNEL_INSTALL_LAYOUT" = "bls" ] || exit 0 +# Read the optional config file +[[ -f /etc/kernel-install-for-dracut.conf ]] && source /etc/kernel-install-for-dracut.conf + MACHINE_ID="${KERNEL_INSTALL_MACHINE_ID:?}" ENTRY_TOKEN="${KERNEL_INSTALL_ENTRY_TOKEN:?}" BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT:?}" @@ -58,6 +61,9 @@ case "$COMMAND" in ;; esac +# Do nothing if the user has elected to omit the fallback initrd +[[ ${NO_DRACUT_FALLBACK} == "true" ]] && exit 0 + if [ -f /etc/os-release ]; then # shellcheck source=/dev/null . /etc/os-release