kdump-lib.sh: add common function strip_comments

Add function strip_comments into kdump-lib.sh, since it's used by
several files.

Signed-off-by: Wade Mealing <wmealing@redhat.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Baoquan He 2013-09-26 19:35:59 +08:00
parent a8921f04ae
commit ee524473c8

View File

@ -17,3 +17,8 @@ is_raw_dump_target()
{ {
grep -q "^raw" /etc/kdump.conf grep -q "^raw" /etc/kdump.conf
} }
strip_comments()
{
echo $1 | sed -e 's/\(.*\)#.*/\1/'
}