From: Benjamin Drung Date: Wed, 16 Aug 2023 23:03:20 +0000 (+0200) Subject: test: support /boot/vmlinux X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb7d5ec4cb06b2b4435327255049e55d34301d27;p=thirdparty%2Fdracut.git test: support /boot/vmlinux On the Ubuntu ppc64el architecture the kernel is named `/boot/vmlinux`. Signed-off-by: Benjamin Drung --- diff --git a/test/run-qemu b/test/run-qemu index 152229344..0ce27b517 100755 --- a/test/run-qemu +++ b/test/run-qemu @@ -30,14 +30,23 @@ fi KVERSION=${KVERSION-$(uname -r)} VMLINUZ="/lib/modules/${KVERSION}/vmlinuz" +if ! [ -f "$VMLINUZ" ]; then + VMLINUZ="/lib/modules/${KVERSION}/vmlinux" +fi if ! [ -f "$VMLINUZ" ]; then [[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id if [[ $MACHINE_ID ]] && { [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]]; }; then VMLINUZ="/boot/${MACHINE_ID}/$KVERSION/linux" - else + elif [ -f "/boot/vmlinuz-${KVERSION}" ]; then VMLINUZ="/boot/vmlinuz-${KVERSION}" + elif [ -f "/boot/vmlinux-${KVERSION}" ]; then + VMLINUZ="/boot/vmlinux-${KVERSION}" + else + echo "Could not find a Linux kernel version $KVERSION to test with!" >&2 + echo "Please install linux." >&2 + exit 1 fi fi