File kdump-kdumprd-Look-for-boot-image-and-boot-Image.patch of Package kdump.21347

From d332bb87cd1d093f8b78ff3d79413d84fa26dea3 Mon Sep 17 00:00:00 2001
From: Petr Tesarik <ptesarik@suse.com>
Date: Fri, 26 Apr 2019 09:27:40 +0200
Subject: kdumprd: Look for /boot/image-* and /boot/Image-*
References: bsc#1132799
Upstream: merged
Git-commit: d332bb87cd1d093f8b78ff3d79413d84fa26dea3

These kernel image names are used on s390(x) and arm*/aarch64,
respectively. Without this change, the path to the kernel must be
given explicitly on the command line if a specific kernel version is
required.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
 init/mkdumprd |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/init/mkdumprd
+++ b/init/mkdumprd
@@ -125,9 +125,9 @@ shift $(($OPTIND -1))
 if [ -z "$KERNEL" ] ; then
     if [ -n "$KERNELVERSION" ] ; then
         KERNEL=/boot/vmlinuz-$KERNELVERSION
-        if ! [ -f "$KERNEL" ] ; then
-            KERNEL=/boot/vmlinux-$KERNELVERSION
-        fi
+        test -f "$KERNEL" || KERNEL=/boot/image-$KERNELVERSION
+        test -f "$KERNEL" || KERNEL=/boot/Image-$KERNELVERSION
+        test -f "$KERNEL" || KERNEL=/boot/vmlinux-$KERNELVERSION
     else
         output=$(kdumptool find_kernel $find_kernel_args)
         KERNEL=$(echo "$output" | grep ^Kernel | cut -f 2)
openSUSE Build Service is sponsored by