Better search for debug etc. kernels (RHBZ#1002189).
[qemu-sanity-check.git] / qemu-sanity-check.in
index dc99786..848c62f 100644 (file)
@@ -99,7 +99,7 @@ fi
 
 # Locate kernel if not specified.
 if [ -z "$kernel" ]; then
-    kernel="$(ls -vr /boot/vmlinuz-*.$arch{,+debug} 2>/dev/null | head -1)"
+    kernel="$(ls -1dvr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen | head -1)"
     if [ -z "$kernel" ]; then
         echo "$0: cannot find a Linux kernel in /boot"
         echo "Choose a kernel to test using --kernel=/path/to/vmlinuz"