Hi,
Thanks for the update, still if anyone has a good idea to fix and support the leading white space please send a patch out. We can review and see if it is good or not.
On 09/22/17 at 04:30pm, Bhupesh Sharma wrote:
Resolves: BZ1484945 https://bugzilla.redhat.com/show_bug.cgi?id=1484945
Currently the kdumpctl script doesn't handle whitespaces (including TABs) which might be there before an option name in the kdump.conf
This patch addresses this issue, by ensuring that the kdumpctl errors out in case it finds any stray space(s) or tab(s) before a option name.
Reported-by: Kenneth D'souza kdsouza@redhat.com Signed-off-by: Bhupesh Sharma bhsharma@redhat.com
Changes since v3:
- Made the check simpler by using grep -E instead of awk
kdumpctl | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/kdumpctl b/kdumpctl index b7a3105026eb..b56d824147b4 100755 --- a/kdumpctl +++ b/kdumpctl @@ -406,6 +406,13 @@ check_config() return 1 }
- # Check if we have any leading spaces (or tabs) before the
- # variable name in the kdump conf file
- if grep -E -q '^[[:blank:]]+[a-z]' $KDUMP_CONFIG_FILE; then
echo "No whitespaces are allowed before a kdump option name in $KDUMP_CONFIG_FILE"
return 1
- fi
- while read config_opt config_val; do case "$config_opt" in #* | "")
-- 2.7.4 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Acked-by: Dave Young dyoung@redhat.com
Thanks Dave