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

From: Petr Tesarik <ptesarik@suse.cz>
Subject: Always pass kernel version to dracut
References: bsc#900418
Upstream: v0.8.17
Git-commit: 950e82a515a2e5ea9386e54b51eb60edc09a758e

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
openSUSE Build Service is sponsored by