File kdump-always-pass-kernelver-to-dracut.patch of Package kdump.624

From: Petr Tesarik <ptesarik@suse.cz>
Subject: Always pass kernel version to dracut
References: bsc#900418
Patch-mainline: not yet

Dracut does not take a kernel image as its argument, but rather the kernel
version, but the KERNELVERSION variable is set only if the kernel version
is explicitly given on the mkdumprd command line.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

---
 init/mkdumprd |    5 +++++
 1 file changed, 5 insertions(+)

--- a/init/mkdumprd
+++ b/init/mkdumprd
@@ -123,6 +123,11 @@ function run_dracut()
     DRACUT_ARGS="--force --hostonly --omit 'plymouth resume usrmount'"
     DRACUT_ARGS="$DRACUT_ARGS --compress='xz -0 --check=crc32'"
 
+    if [ -z "$KERNELVERSION" ]
+    then
+	KERNELVERSION=$(get_kernel_version "$KERNEL")
+    fi
+
     # add mount points
     kdump_get_mountpoints || return 1
     i=0