Fix fallback entry getting generated when NO_DRACUT_FALLBACK is true

This commit is contained in:
dalto 2023-08-30 16:56:18 -05:00
parent de5c9bcd38
commit 642ace5882
1 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,9 @@ INITRD_OPTIONS_SHIFT=4
[ "$KERNEL_INSTALL_LAYOUT" = "bls" ] || exit 0 [ "$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:?}" MACHINE_ID="${KERNEL_INSTALL_MACHINE_ID:?}"
ENTRY_TOKEN="${KERNEL_INSTALL_ENTRY_TOKEN:?}" ENTRY_TOKEN="${KERNEL_INSTALL_ENTRY_TOKEN:?}"
BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT:?}" BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT:?}"
@ -58,6 +61,9 @@ case "$COMMAND" in
;; ;;
esac 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 if [ -f /etc/os-release ]; then
# shellcheck source=/dev/null # shellcheck source=/dev/null
. /etc/os-release . /etc/os-release