fadump: fix passing additional parameters for capture kernel
Resolves: https://issues.redhat.com/browse/RHEL-52925 Upstream: kdump-utils commit 53d8e6ecd6177568a245bf3ce3558798897195c4 Author: Hari Bathini <hbathini@linux.ibm.com> Date: Sun Nov 17 09:15:48 2024 +0530 fadump: fix passing additional parameters for capture kernel Currently, additional parameters for fadump capture kernel are being set only with reload command. In fact, the check for bootargs_append node before writing to it is incorrect too. Fix it and also, setup fadump aditional parameters for start/restart case as well. Fixes: 77b80ce5 ("fadump: pass additional parameters for capture kernel") Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Signed-off-by: Pingfan Liu <piliu@redhat.com>
This commit is contained in:
parent
340188939b
commit
8cdec3d251
26
kdumpctl
26
kdumpctl
@ -942,8 +942,24 @@ check_dump_feasibility()
|
||||
check_kdump_feasibility
|
||||
}
|
||||
|
||||
fadump_bootargs_append()
|
||||
{
|
||||
if [[ -f "$FADUMP_APPEND_ARGS_SYS_NODE" ]]; then
|
||||
output=$( { echo "${FADUMP_COMMANDLINE_APPEND}" > "$FADUMP_APPEND_ARGS_SYS_NODE" ; } 2>&1)
|
||||
if [ $? -eq 0 ]; then
|
||||
output=$(cat "$FADUMP_APPEND_ARGS_SYS_NODE")
|
||||
dinfo "fadump: additional parameters for capture kernel: '$output'"
|
||||
else
|
||||
dwarn "WARNING: failed to setup additional parameters for fadump capture kernel: '$output'"
|
||||
fi
|
||||
else
|
||||
dwarn "WARNING: this kernel does not support passing additional parameters to fadump capture kernel."
|
||||
fi
|
||||
}
|
||||
|
||||
start_fadump()
|
||||
{
|
||||
fadump_bootargs_append
|
||||
echo 1 > "$FADUMP_REGISTER_SYS_NODE"
|
||||
if ! is_kernel_loaded "fadump"; then
|
||||
derror "fadump: failed to register"
|
||||
@ -1130,15 +1146,7 @@ stop_kdump()
|
||||
|
||||
reload_fadump()
|
||||
{
|
||||
if "$FADUMP_APPEND_ARGS_SYS_NODE"; then
|
||||
output=$(echo "${FADUMP_COMMANDLINE_APPEND}" > "$FADUMP_APPEND_ARGS_SYS_NODE")
|
||||
if [ $? -eq 0 ]; then
|
||||
output=$(cat "$FADUMP_APPEND_ARGS_SYS_NODE")
|
||||
dinfo "fadump: additional parameters '$output' for capture kernel"
|
||||
else
|
||||
dwarn "WARNING: failed to setup additional parameters for fadump capture kernel ($output)"
|
||||
fi
|
||||
fi
|
||||
fadump_bootargs_append
|
||||
if echo 1 > "$FADUMP_REGISTER_SYS_NODE"; then
|
||||
dinfo "fadump: re-registered successfully"
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user