]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fix built-in initramfs case
authorBVK Chaitanya <bvk.groups@gmail.com>
Mon, 18 Oct 2010 08:08:42 +0000 (13:38 +0530)
committerBVK Chaitanya <bvk.groups@gmail.com>
Mon, 18 Oct 2010 08:08:42 +0000 (13:38 +0530)
util/grub.d/10_linux.in

index e37bab21b68858e2f91d31033c3abc0ec47c2f4f..ceee61154b78a30d907035b116fabd677290e6fc 100644 (file)
@@ -127,10 +127,20 @@ while [ "x$list" != "x" ] ; do
       break
     fi
   done
+
+  initramfs=
+  for i in "config-${version}" "config-${alt_version}"; do
+    if test -e "${dirname}/${i}" ; then
+      initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${dirname}/${i}" | cut -f2 -d= | tr -d \"`
+      break
+    fi
+  done
+
   if test -n "${initrd}" ; then
     echo "Found initrd image: ${dirname}/${initrd}" >&2
-  else
-    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
+  elif test -z "${initramfs}" ; then
+    # "UUID=" magic is parsed by initrd or initramfs.  Since there's
+    # no initrd or builtin initramfs, it can't work here.
     linux_root_device_thisversion=${GRUB_DEVICE}
   fi