File kdump-do-not-ignore-kexec-exit-code.patch of Package kdump

From: Petr Tesarik <ptesarik@suse.com>
Date: Wed Jun 22 12:57:28 2016 +0200
Subject: Use the exit code of kexec, not that of "local"
References: bsc#984799
Patch-mainline: v0.8.16
Git-commit: 9397b6ef0531c534508cbf49499ebcbd59327d13

The "local" keyword cannot be combined with the assignment here.
The return status is in fact the return status of "local", which
is always 0. OTOH, the "eval" does preserve the exit code.

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

---
 init/load.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/init/load.sh
+++ b/init/load.sh
@@ -164,7 +164,8 @@ function load_kdump_kexec()
         echo "Loading kdump kernel: $KEXEC_CALL"
     fi
 
-    local output=$(eval "$KEXEC_CALL" 2>&1)
+    local output
+    output=$(eval "$KEXEC_CALL" 2>&1)
     if [ $? -eq 0 ] ; then
 	result=0
     else
openSUSE Build Service is sponsored by