fix built-in initramfs case

This commit is contained in:
BVK Chaitanya 2010-10-18 13:38:42 +05:30
parent 800e6a9be5
commit 6351c13140

View file

@ -127,10 +127,20 @@ while [ "x$list" != "x" ] ; do
break break
fi fi
done 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 if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2 echo "Found initrd image: ${dirname}/${initrd}" >&2
else elif test -z "${initramfs}" ; then
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here. # "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} linux_root_device_thisversion=${GRUB_DEVICE}
fi fi