initramfs: Guard against non-existing block device during kdump
Being extra cautious to prevent hangs. Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
@ -35,6 +35,11 @@
|
||||
BASE_FOLDER="$(cat /usr/lib/kdump/kdump.dir)"
|
||||
KDUMP_FOLDER="/kdump_path/${BASE_FOLDER}/crash/${KDUMP_TIMESTAMP}"
|
||||
|
||||
# Check if the device node exists - or else, just bails-out.
|
||||
if [ ! -e "${MOUNT_POINT}" ]; then
|
||||
reboot -f
|
||||
fi
|
||||
|
||||
mkdir -p "/kdump_path"
|
||||
if ! mount "${MOUNT_POINT}" /kdump_path; then
|
||||
reboot -f
|
||||
|
||||
Reference in New Issue
Block a user