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)"
|
BASE_FOLDER="$(cat /usr/lib/kdump/kdump.dir)"
|
||||||
KDUMP_FOLDER="/kdump_path/${BASE_FOLDER}/crash/${KDUMP_TIMESTAMP}"
|
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"
|
mkdir -p "/kdump_path"
|
||||||
if ! mount "${MOUNT_POINT}" /kdump_path; then
|
if ! mount "${MOUNT_POINT}" /kdump_path; then
|
||||||
reboot -f
|
reboot -f
|
||||||
|
|||||||
Reference in New Issue
Block a user