]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub.d/10_linux.in: Try version without ".old" when
authorproski <proski@localhost>
Wed, 2 Jan 2008 08:34:41 +0000 (08:34 +0000)
committerproski <proski@localhost>
Wed, 2 Jan 2008 08:34:41 +0000 (08:34 +0000)
looking for initrd.  It's better to use initrd from the newer
kernel of the same version than no initrd at all.

ChangeLog
util/grub.d/10_linux.in

index 78ed725240e4b38a1f33424b2f1b795c4e4c74d3..c9585b0a6ce8caa5ca69bfd969e7dc11736d06ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-02  Pavel Roskin  <proski@gnu.org>
+
+       * 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  <rmh@aybabtu.com>
 
        * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
index d7c948d22efdb0a0fc9ab94c4996a5559f7c7f11..7aaed19f8c76cfdf5ccf8f9de59fb59ce9762b8d 100644 (file)
@@ -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