]> git.proxmox.com Git - grub2.git/commitdiff
* util/grub.d/20_linux_xen.in: Bail out early if linux_list is
authorColin Watson <cjwatson@ubuntu.com>
Fri, 11 Feb 2011 13:00:54 +0000 (13:00 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 11 Feb 2011 13:00:54 +0000 (13:00 +0000)
empty, since in that case we can only generate either nothing or a
syntactically invalid configuration file.
Reported by: Michal Suchanek.  Fixes Debian bug #612898.

ChangeLog
util/grub.d/20_linux_xen.in

index 56498af1bd975cb8d6a7a36c7f82072e546dabc5..6e9ab5758fef1c1ba2bb3c4f3fc3a7073ae1b4d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-11  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub.d/20_linux_xen.in: Bail out early if linux_list is
+       empty, since in that case we can only generate either nothing or a
+       syntactically invalid configuration file.
+       Reported by: Michal Suchanek.  Fixes Debian bug #612898.
+
 2011-02-09  Colin Watson  <cjwatson@ubuntu.com>
 
        * docs/grub.texi (Kernel): Add reference to grub-mkrescue.
index 356219e1d5d0fae87981a35e73a103f69364d827..e71fc145892ace552052305db21b27ab8c2da291 100644 (file)
@@ -98,6 +98,9 @@ linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
        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 ; then echo -n "$i " ; fi
       done`
+if [ "x${linux_list}" = "x" ] ; then
+    exit 0
+fi
 xen_list=`for i in /boot/xen*; do
         if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
       done`