kdumpst-load: Guard initrd creation against failures
Though rare, they might happen and then journal show non-handled errors - better sanitize a bit the message. Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
@ -214,6 +214,12 @@ fi
|
||||
INITRD_FNAME="${MOUNT_FOLDER}/kdump-initrd-$(uname -r).img"
|
||||
if [ ! -s "${INITRD_FNAME}" ]; then
|
||||
create_initrd
|
||||
|
||||
# Check if create_initrd() succeeded.
|
||||
if [ ! -s "${INITRD_FNAME}" ]; then
|
||||
logger "kdumpst: failure on initrd creation - aborting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! kexec -s -p "${VMLINUX}" --initrd "${INITRD_FNAME}" --append="${KDUMP_CMDLINE}"; then
|
||||
|
||||
Reference in New Issue
Block a user