dracut-kdump.sh: don't put KDUMP_SCRIPT_DIR in PATH

upstream: fedora
resolves: bz2003832
conflict: none

commit 0675edbadb
Author: Kairui Song <kasong@redhat.com>
Date:   Mon Aug 2 01:19:44 2021 +0800

    dracut-kdump.sh: don't put KDUMP_SCRIPT_DIR in PATH

    monitor_dd_progress is the only extra binary in KDUMP_SCRIPT_DIR, no
    need to change PATH environment variable, just call it directly.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
Tao Liu 2021-11-03 19:06:48 +08:00
parent f9025ca711
commit 28cf217362

View File

@ -24,7 +24,6 @@ DATEDIR=`date +%Y-%m-%d-%T`
HOST_IP='127.0.0.1' HOST_IP='127.0.0.1'
DUMP_INSTRUCTION="" DUMP_INSTRUCTION=""
SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
KDUMP_SCRIPT_DIR="/kdumpscripts"
DD_BLKSIZE=512 DD_BLKSIZE=512
FINAL_ACTION="systemctl reboot -f" FINAL_ACTION="systemctl reboot -f"
KDUMP_PRE="" KDUMP_PRE=""
@ -35,8 +34,6 @@ OPALCORE="/sys/firmware/opal/mpipl/core"
set -o pipefail set -o pipefail
DUMP_RETVAL=0 DUMP_RETVAL=0
export PATH=$PATH:$KDUMP_SCRIPT_DIR
get_kdump_confs() get_kdump_confs()
{ {
local config_opt config_val local config_opt config_val
@ -378,7 +375,7 @@ dump_raw()
if ! $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then if ! $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then
_src_size=`ls -l /proc/vmcore | cut -d' ' -f5` _src_size=`ls -l /proc/vmcore | cut -d' ' -f5`
_src_size_mb=$(($_src_size / 1048576)) _src_size_mb=$(($_src_size / 1048576))
monitor_dd_progress $_src_size_mb & /kdumpscripts/monitor_dd_progress $_src_size_mb &
fi fi
dinfo "saving vmcore" dinfo "saving vmcore"