kexec-tools/kdump-lib.sh
Baoquan He a682315996 kdump-lib.sh: strip_comments is not implemented correcty
In mkdumprd, strip_comments is not implemented correctly. Since arguments
passed, strip_comments only take $1 and misses others. This caused
problems. Such as below line, current code will only get "makedumpfile"
and pass it to $config_val finally, then parameters for makedumpfile
are missed.

core_collector makedumpfile -c --message-level 1 -d 31

Now modify function strip_comments.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2013-10-12 16:00:12 +08:00

25 lines
297 B
Bash
Executable File

#!/bin/sh
#
# Kdump common functions
#
is_ssh_dump_target()
{
grep -q "^ssh[[:blank:]].*@" /etc/kdump.conf
}
is_nfs_dump_target()
{
grep -q "^nfs" /etc/kdump.conf
}
is_raw_dump_target()
{
grep -q "^raw" /etc/kdump.conf
}
strip_comments()
{
echo $@ | sed -e 's/\(.*\)#.*/\1/'
}