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>
This commit is contained in:
Kairui Song 2021-08-02 01:19:44 +08:00
parent a1205effaa
commit 0675edbadb

View File

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