From: Kenneth D'souza <kdsouza@redhat.com>
Currently the kdumpctl script doesn't check if the path option is
set more than once due to which a vmcore is not captured.
This patch addresses this issue by ensuring that only one path
is specified in /etc/kdump.conf file.
Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
---
kdumpctl | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kdumpctl b/kdumpctl
index 6a01c13..e07ec06 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -204,6 +204,13 @@ check_config()
return 1
}
+ # Check if path option is set more than once.
+ nr=$(awk 'BEGIN{cnt=0} /^path /{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
+ [ $nr -gt 1 ] && {
+ echo "Mutiple paths specifed in $KDUMP_CONFIG_FILE"
+ return 1
+ }
+
nr=$(grep "^dracut_args .*\-\-mount" $KDUMP_CONFIG_FILE | grep -o "\-\-mount" | wc -l)
[ $nr -gt 1 ] && {
echo "Multiple mount targets specified in one \"dracut_args\"."
--
2.14.3
_______________________________________________
kexec mailing list -- kexec@lists.fedoraproject.org
To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/message/5FMCOEWRBCOIUOVQH5SYI5TSYNHGL4Q3/