2N/A# grub-mkconfig helper script. 2N/A# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc. 2N/A# GRUB is free software: you can redistribute it and/or modify 2N/A# it under the terms of the GNU General Public License as published by 2N/A# the Free Software Foundation, either version 3 of the License, or 2N/A# (at your option) any later version. 2N/A# GRUB is distributed in the hope that it will be useful, 2N/A# but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A# GNU General Public License for more details. 2N/A# You should have received a copy of the GNU General Public License 2N/ACLASS=
"--class gnu-linux --class gnu --class os --class xen" 2N/Aif [
"x${GRUB_DISTRIBUTOR}" =
"x" ] ;
then 2N/A# loop-AES arranges things so that /dev/loop/X can be our root device, but 2N/A# the initrds that Linux uses don't like that. 2N/Aif [
"x${GRUB_DEVICE_UUID}" =
"x" ] || [
"x${GRUB_DISABLE_LINUX_UUID}" =
"xtrue" ] \
2N/A# Allow overriding GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT. 2N/Aif [
"${GRUB_CMDLINE_LINUX_XEN_REPLACE}" ];
then 2N/Aif [
"${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ];
then 2N/A if [
"x${rootsubvol}" != x ];
then 2N/A printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${xen_version}" "${version}" 2N/A if [ -z "${prepare_boot_cache}" ]; then 2N/A multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} 2N/A module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} 2N/A if test -n "${initrd}" ; then 2N/A module ${rel_dirname}/${initrd} 2N/A if test -e "${j}" ; then 2N/A 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 2N/Aif [
"x${linux_list}" =
"x" ] ;
then 2N/Awhile [
"x${xen_list}" !=
"x" ] ;
do 2N/A echo "submenu \"Xen ${xen_version}\" {" 2N/A "initrd-${alt_version}.img" "initrd-${alt_version}" \
2N/A "initramfs-genkernel-${version}" \
2N/A "initramfs-genkernel-${alt_version}" ;
do 2N/A if test -e
"${dirname}/${i}" ;
then 2N/A if test -n
"${initrd}" ;
then 2N/A echo "Found initrd image: ${dirname}/${initrd}" >&
2 2N/A # "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here. 2N/A "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" 2N/A if [
"x${GRUB_DISABLE_RECOVERY}" !=
"xtrue" ];
then 2N/A "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"