# HG changeset patch # User Gang Wei # Date 1364897853 -28800 # Node ID 7e8dd5f8b1cd672b6cc876727984dd9cc4077c0e # Parent 984468adc8fbbf086fac1cfcd97e62bdf3195e39 Fix possible empty submenu block in generated grub.cfg Signed-off-by: Gang Wei diff -r 984468adc8fb -r 7e8dd5f8b1cd tboot/20_linux_tboot --- a/tboot/20_linux_tboot Fri Mar 29 12:48:06 2013 +0800 +++ b/tboot/20_linux_tboot Tue Apr 02 18:17:33 2013 +0800 @@ -127,7 +127,7 @@ done` prepare_boot_cache= -while [ "x${tboot_list}" != "x" ] ; do +while [ "x${tboot_list}" != "x" ] && [ "x$linux_list" != "x" ] ; do list="${linux_list}" current_tboot=`version_find_latest $tboot_list` tboot_basename=`basename ${current_tboot}` diff -r 984468adc8fb -r 7e8dd5f8b1cd tboot/20_linux_xen_tboot --- a/tboot/20_linux_xen_tboot Fri Mar 29 12:48:06 2013 +0800 +++ b/tboot/20_linux_xen_tboot Tue Apr 02 18:17:33 2013 +0800 @@ -171,7 +171,7 @@ rel_xen_dirname=`make_system_path_relative_to_its_root $xen_dirname` xen_version=`echo $xen_basename | sed -e "s,.gz$,,g;s,^xen-,,g"` tlist="${tboot_list}" - while [ "x${tlist}" != "x" ] ; do + while [ "x${tlist}" != "x" ] && [ "x$linux_list" != "x" ] ; do current_tboot=`version_find_latest $tlist` tboot_basename=`basename ${current_tboot}` tboot_dirname=`dirname ${current_tboot}`