* util/grub.d/10_linux.in: Fix detection of genkernel initramfs.

This commit is contained in:
Mike Gilbert 2012-04-18 23:25:21 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent 1501ac21b0
commit f8315e145d
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2012-04-18 Mike Gilbert <floppym@gentoo.org>
* util/grub.d/10_linux.in: Fix detection of genkernel initramfs.
2012-04-18 Bean <bean123ch@gmail.com>
* grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right

View file

@ -150,7 +150,8 @@ EOF
EOF
}
case x`uname -m` in
machine=`uname -m`
case "x$machine" in
xi?86 | xx86_64)
list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
@ -161,6 +162,14 @@ case x`uname -m` in
done` ;;
esac
case "$machine" in
i?86) GENKERNEL_ARCH="x86" ;;
mips|mips64) GENKERNEL_ARCH="mips" ;;
mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
arm*) GENKERNEL_ARCH="arm" ;;
*) GENKERNEL_ARCH="$machine" ;;
esac
prepare_boot_cache=
prepare_root_cache=
boot_device_id=
@ -187,7 +196,9 @@ while [ "x$list" != "x" ] ; do
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
"initramfs-genkernel-${alt_version}"; do
"initramfs-genkernel-${alt_version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break