]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix detection of dom0 kernels
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 28 Jun 2010 00:24:08 +0000 (02:24 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 28 Jun 2010 00:24:08 +0000 (02:24 +0200)
util/grub.d/20_linux_xen.in

index 862f43888a370b70ad615ca71d1930c906b67ecd..9a0136a7642dceebbefe5d632f07dd71b55e6065 100644 (file)
@@ -85,8 +85,10 @@ EOF
 EOF
 }
 
-linux_list=`for i in /boot/vmlinu[xz]-*jeremy* /vmlinu[xz]-*jeremy* ; do
-        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
+linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
+       basename=$(basename $i)
+       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`
 xen_list=`for i in /boot/xen*; do
         if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi