From d86e186ff12d6c09ea184a8791ede5c806c674ca Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 28 Jun 2010 02:24:08 +0200 Subject: [PATCH] Fix detection of dom0 kernels --- util/grub.d/20_linux_xen.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index 862f43888..9a0136a76 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -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