On 10/29/20 at 10:21am, Lianbo Jiang wrote:
Let's add some code comments to help better understanding, and
no code changes.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
dracut-early-kdump.sh | 3 +++
kdumpctl | 4 ++++
2 files changed, 7 insertions(+)
Looks goot to me. Thanks.
Acked-by: Baoquan He <bhe(a)redhat.com>
diff --git a/dracut-early-kdump.sh b/dracut-early-kdump.sh
index 23bb369a0c13..a4e14a46bf75 100755
--- a/dracut-early-kdump.sh
+++ b/dracut-early-kdump.sh
@@ -53,6 +53,9 @@ early_kdump_load()
EARLY_KEXEC_ARGS="$EARLY_KEXEC_ARGS -s"
fi
+ # Here, only output the messages, but do not save these messages
+ # to a file because the target disk may not be mounted yet, the
+ # earlykdump is too early.
ddebug "earlykdump: $KEXEC ${EARLY_KEXEC_ARGS} $standard_kexec_args \
--command-line=$EARLY_KDUMP_CMDLINE --initrd=$EARLY_KDUMP_INITRD \
$EARLY_KDUMP_KERNEL"
diff --git a/kdumpctl b/kdumpctl
index e81671987c9b..94e4f5a1c020 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -719,6 +719,10 @@ load_kdump()
ddebug "$KEXEC $KEXEC_ARGS $standard_kexec_args --command-line=$KDUMP_COMMANDLINE
--initrd=$TARGET_INITRD $KDUMP_KERNEL"
+ # The '12' represents an intermediate temporary file descriptor
+ # to store the standard error file descriptor '2', and later
+ # restore the error file descriptor with the file descriptor '12'
+ # and release it.
exec 12>&2
exec 2>> $KDUMP_LOG_PATH/kdump.log
PS4='+ $(date "+%Y-%m-%d %H:%M:%S") ${BASH_SOURCE}@${LINENO}: '
--
2.17.1
_______________________________________________
kexec mailing list -- kexec(a)lists.fedoraproject.org
To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org