mkdumprd: display the absolute path of dump location in the check_user_configured_target()

upstream: fedora
resolves: bz2003832
conflict: none

commit 2d9504c4a4
Author: Lianbo Jiang <lijiang@redhat.com>
Date:   Tue Jun 1 18:33:44 2021 +0800

    mkdumprd: display the absolute path of dump location in the check_user_configured_target()

    When kdump service fails, the current errors do not display the
    absolute path of dump location(marked it as "^"), for example:

    kdump: kexec: unloaded kdump kernel
    kdump: Stopping kdump: [OK]
    kdump: Detected change(s) in the following file(s):  /etc/kdump.conf
    kdump: Rebuilding /boot/initramfs-4.18.0-304.el8.x86_64kdump.img
    kdump: Dump path "/var1/crash" does not exist in dump target "UUID=c202ef45-3ac3-4adb-85e7-307a916757f0"
                      ^^^^^^^^^^^
    kdump: mkdumprd: failed to make kdump initrd
    kdump: Starting kdump: [FAILED]

    Here, it should output the absolute path of dump location with this
    format: "<mount path>/<path>". To fix it, let's extend the relative
    pathname to the absolute pathname in check_user_configured_target().

    Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
Tao Liu 2021-11-09 21:10:25 +08:00
parent 98e1935293
commit 20c694278f
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ check_user_configured_target()
# For user configured target, use $SAVE_PATH as the dump path within the target
if [ ! -d "$_mnt/$SAVE_PATH" ]; then
perror_exit "Dump path \"$SAVE_PATH\" does not exist in dump target \"$_target\""
perror_exit "Dump path \"$_mnt/$SAVE_PATH\" does not exist in dump target \"$_target\""
fi
check_size fs "$_target"