From 92695df9e88139ab8a1ac4bcc362af73cbb91d56 Mon Sep 17 00:00:00 2001 From: proski Date: Wed, 2 Jan 2008 08:34:41 +0000 Subject: [PATCH] * util/grub.d/10_linux.in: Try version without ".old" when looking for initrd. It's better to use initrd from the newer kernel of the same version than no initrd at all. --- ChangeLog | 6 ++++++ util/grub.d/10_linux.in | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 78ed72524..c9585b0a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-02 Pavel Roskin + + * util/grub.d/10_linux.in: Try version without ".old" when + looking for initrd. It's better to use initrd from the newer + kernel of the same version than no initrd at all. + 2008-01-01 Robert Millan * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs. diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index d7c948d22..7aaed19f8 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -84,9 +84,11 @@ while [ "x$list" != "x" ] ; do dirname=`dirname $linux` grub_dirname=`echo ${dirname} | sed -e "s%^/boot%${GRUB_DRIVE_BOOT}%g"` version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` + alt_version=`echo $version | sed -e "s,\.old$,,g"` initrd= - for i in "initrd.img-${version}" "initrd-${version}.img"; do + for i in "initrd.img-${version}" "initrd-${version}.img" \ + "initrd.img-${alt_version}" "initrd-${alt_version}.img"; do if test -e "${dirname}/${i}" ; then initrd="$i" break