]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(dracut.sh): recognize kernel file in /boot named vmlinux too
authorIcenowy Zheng <uwu@icenowy.me>
Sun, 18 Feb 2024 15:20:06 +0000 (23:20 +0800)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Tue, 2 Apr 2024 21:31:17 +0000 (17:31 -0400)
The kernel file, at least in AOSC OS, is named vmlinux instead of
vmlinuz if uncompressed.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
dracut.sh

index 5685a5ea0d2ef5707f24a4cf2c6afad13075533a..137df3387d77c4b79ee5763245831768fa0d17ff 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1154,7 +1154,7 @@ 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} ]]; then
+        elif [[ -e $dracutsysrootdir/boot/vmlinuz-${kernel} || -e $dracutsysrootdir/boot/vmlinux-${kernel} ]]; then
             outfile="$dracutsysrootdir/boot/initramfs-${kernel}.img"
         elif [[ -z $dracutsysrootdir ]] \
             && [[ $MACHINE_ID ]] \