* util/grub.d/10_linux.in: Try alternative config filenames where
we parse config file. * util/grub.d/20_linux_xen.in: Likewise.
This commit is contained in:
parent
baad885c14
commit
090b1b6ac6
3 changed files with 27 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-03-30 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub.d/10_linux.in: Try alternative config filenames where
|
||||||
|
we parse config file.
|
||||||
|
* util/grub.d/20_linux_xen.in: Likewise.
|
||||||
|
|
||||||
2011-03-30 Alexey Shvetsov <alexxy@gentoo.org>
|
2011-03-30 Alexey Shvetsov <alexxy@gentoo.org>
|
||||||
|
|
||||||
* util/grub.d/10_linux.in: Add gentoo-specific Linux and initrd names.
|
* util/grub.d/10_linux.in: Add gentoo-specific Linux and initrd names.
|
||||||
|
|
|
@ -73,8 +73,8 @@ linux_entry ()
|
||||||
cat << EOF
|
cat << EOF
|
||||||
load_video
|
load_video
|
||||||
EOF
|
EOF
|
||||||
if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
|
if grep -qx "CONFIG_FB_EFI=y" "${config}" 2> /dev/null \
|
||||||
&& grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
|
&& grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" "${config}" 2> /dev/null; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
EOF
|
EOF
|
||||||
|
@ -147,14 +147,19 @@ while [ "x$list" != "x" ] ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
initramfs=
|
config=
|
||||||
for i in "config-${version}" "config-${alt_version}"; do
|
for i in "config-${version}" "config-${alt_version}"; do
|
||||||
if test -e "${dirname}/${i}" ; then
|
if test -e "${dirname}/${i}" ; then
|
||||||
initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${dirname}/${i}" | cut -f2 -d= | tr -d \"`
|
config="${dirname}/${i}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
initramfs=
|
||||||
|
if test -n "${config}" ; then
|
||||||
|
initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
|
||||||
|
fi
|
||||||
|
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
echo "Found initrd image: ${dirname}/${initrd}" >&2
|
echo "Found initrd image: ${dirname}/${initrd}" >&2
|
||||||
elif test -z "${initramfs}" ; then
|
elif test -z "${initramfs}" ; then
|
||||||
|
|
|
@ -94,9 +94,19 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
|
linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
|
||||||
|
if grub_file_is_not_garbage "$i"; then
|
||||||
basename=$(basename $i)
|
basename=$(basename $i)
|
||||||
version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
|
version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
|
||||||
if grub_file_is_not_garbage "$i" && (grep -qx "CONFIG_XEN_DOM0=y" /boot/config-${version} 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" /boot/config-${version} 2> /dev/null); then echo -n "$i " ; fi
|
dirname=$(dirname $i)
|
||||||
|
config=
|
||||||
|
for j in "config-${version}" "config-${alt_version}"; do
|
||||||
|
if test -e "${dirname}/${j}" ; then
|
||||||
|
config="${dirname}/${j}"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null); then echo -n "$i " ; fi
|
||||||
|
fi
|
||||||
done`
|
done`
|
||||||
if [ "x${linux_list}" = "x" ] ; then
|
if [ "x${linux_list}" = "x" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue