X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqemu-sanity-check.in;fp=src%2Fqemu-sanity-check.in;h=0c96485e914b2baff4405d422f5da65df9cc0827;hb=e0cd93ad3979388db733852df6d1cdb60f3f931a;hp=719261ae811c9d9c5a5a38ef4d9dc93d103ba211;hpb=e1fe3cabd5892ea49ed08333306c50d61aca38ca;p=qemu-sanity-check.git diff --git a/src/qemu-sanity-check.in b/src/qemu-sanity-check.in index 719261a..0c96485 100644 --- a/src/qemu-sanity-check.in +++ b/src/qemu-sanity-check.in @@ -152,16 +152,18 @@ fi # Locate kernel if not specified. if [ -z "$kernel" ]; then + shopt -s nullglob if [ "$verbose" = "yes" ]; then echo "all kernels:" - ls -1dvr /boot/vmlinuz-*.$arch* + ls -1dvr /lib/modules/*/vmlinuz /boot/vmlinuz-*.$arch* fi - kernel="$(ls -1dvr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen | head -1)" + kernel="$(ls -1dvr /lib/modules/*/vmlinuz /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" exit 2 fi + shopt -u nullglob fi if [ ! -r "$kernel" ]; then echo "$0: kernel $kernel is not readable"