Better search for debug etc. kernels (RHBZ#1002189).
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 28 Aug 2013 16:00:29 +0000 (17:00 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 28 Aug 2013 16:00:29 +0000 (17:00 +0100)
This code now matches the same code in the original febootstrap
(pre-rewrite in C) shell script.  Except that we don't look for kernel
names that don't contain $arch, since that would only apply on really
ancient RHEL.

This updates commit e15822c82b3888420187eb32db82554266a6f350.

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"