From c520f3a49ddb7b7225cdac4dd3c4d9f68e7d105c Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Mon, 5 Aug 2024 09:25:04 +0200 Subject: [PATCH] fix(dracut.sh): account for the kernel being named kernel kernel is also a name accepted by grub-mkconfig. On Gentoo the kernel is named this way if systemd's kernel-install is used. --- dracut.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dracut.sh b/dracut.sh index 64663777d..ce523c0a5 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1138,7 +1138,9 @@ if ! [[ $outfile ]]; then outfile="$dracutsysrootdir/boot/efi/${MACHINE_ID}/${kernel}/initrd" elif [[ -f "$dracutsysrootdir"/lib/modules/${kernel}/initrd ]]; then outfile="$dracutsysrootdir/lib/modules/${kernel}/initrd" - elif [[ -e $dracutsysrootdir/boot/vmlinuz-${kernel} || -e $dracutsysrootdir/boot/vmlinux-${kernel} ]]; then + elif [[ -e $dracutsysrootdir/boot/vmlinuz-${kernel} || + -e $dracutsysrootdir/boot/vmlinux-${kernel} || + -e $dracutsysrootdir/boot/kernel-${kernel} ]]; then outfile="$dracutsysrootdir/boot/$initrdname" elif [[ -z $dracutsysrootdir ]] \ && [[ $MACHINE_ID ]] \