Skip to content

Commit

Permalink
fix(dracut.sh): account for the kernel being named kernel
Browse files Browse the repository at this point in the history
kernel is also a name accepted by grub-mkconfig.

On Gentoo the kernel is named this way if systemd's kernel-install is used.
  • Loading branch information
Nowa-Ammerlaan authored and Conan-Kudo committed Aug 5, 2024
1 parent 8ee870b commit c520f3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]] \
Expand Down

0 comments on commit c520f3a

Please sign in to comment.