kdump-load/save-dumps: Fix some return code on errors

We have been way too conservative to prevent boot flaws, returning
always success even on failures. This is changed now.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2022-11-25 11:26:14 -03:00
parent 184217373b
commit 7f212ffb73
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ grub_update() {
logger "kdump: kexec cannot work, no reserved memory in this boot..." logger "kdump: kexec cannot work, no reserved memory in this boot..."
logger "kdump: but we automatically set crashkernel for next boot." logger "kdump: but we automatically set crashkernel for next boot."
exit 0 exit 0 # this is considered a successful run
fi fi
if [ "$1" = "pstore" ] && [ "${CRASHK}" -ne 0 ]; then if [ "$1" = "pstore" ] && [ "${CRASHK}" -ne 0 ]; then
@ -166,6 +166,6 @@ fi
if ! kexec -s -p "${VMLINUX#*BOOT_IMAGE=}" --initrd "${INITRD_FNAME}" --append="${KDUMP_CMDLINE}"; then if ! kexec -s -p "${VMLINUX#*BOOT_IMAGE=}" --initrd "${INITRD_FNAME}" --append="${KDUMP_CMDLINE}"; then
logger "kdump: kexec load failed" logger "kdump: kexec load failed"
exit 0 exit 1
fi fi
logger "kdump: panic kexec loaded successfully" logger "kdump: panic kexec loaded successfully"

View File

@ -30,7 +30,7 @@ rm -f "${KDUMP_MNT}"
if [ ! -d "${KDUMP_MAIN_FOLDER}" ]; then if [ ! -d "${KDUMP_MAIN_FOLDER}" ]; then
logger "kdump: invalid folder (${KDUMP_MAIN_FOLDER}) - aborting..." logger "kdump: invalid folder (${KDUMP_MAIN_FOLDER}) - aborting..."
exit 0 exit 1
fi fi
LOGS_FOUND=0 LOGS_FOUND=0