]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub.d/10_linux.in: Correctly handle the Linux in root.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 10 May 2011 08:40:22 +0000 (10:40 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 10 May 2011 08:40:22 +0000 (10:40 +0200)
ChangeLog
util/grub.d/10_linux.in

index ed0bc71d6373c8839e5b5cfb172a136f1ba26f23..d36d3441fcdab5a2d82683e25bb1f9e10fa76c4d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub.d/10_linux.in: Correctly handle the Linux in root.
+
 2011-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/loader/efi/chainloader.c (grub_chainloader_unload): Set
index 1dbcad90c2afba35cba644677d5a437b88dedbe9..3c3a2a5d53ffdbc799a4c48f294a5e47764174b4 100644 (file)
@@ -98,10 +98,17 @@ EOF
 EOF
   fi
 
-  if [ -z "${prepare_boot_cache}" ]; then
-    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
+  if [ x$dirname = x/ ]; then
+    if [ -z "${prepare_root_cache}" ]; then
+      prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
+    fi
+    printf '%s\n' "${prepare_root_cache}"
+  else
+    if [ -z "${prepare_boot_cache}" ]; then
+      prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
+    fi
+    printf '%s\n' "${prepare_boot_cache}"
   fi
-  printf '%s\n' "${prepare_boot_cache}"
   message="$(gettext_printf "Loading Linux %s ..." ${version})"
   cat << EOF
        echo    '$message'
@@ -131,6 +138,7 @@ case x`uname -m` in
 esac
 
 prepare_boot_cache=
+prepare_root_cache=
 
 while [ "x$list" != "x" ] ; do
   linux=`version_find_latest $list`