Use read_strip_comments to filter the installed kdump.conf

This help remove redundant spaces and tailing comment in installed
kdump.conf, currently installed kdump.conf always contain extra empty
lines.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Lianbo Jiang <lijiang@redhat.com>
This commit is contained in:
Kairui Song 2020-03-11 01:32:32 +08:00
parent 632c369ec2
commit e78639b46f

View File

@ -487,7 +487,7 @@ adjust_bind_mount_path()
#install kdump.conf and what user specifies in kdump.conf #install kdump.conf and what user specifies in kdump.conf
kdump_install_conf() { kdump_install_conf() {
local _opt _val _pdev local _opt _val _pdev
sed -ne '/^#/!p' /etc/kdump.conf > ${initdir}/tmp/$$-kdump.conf (read_strip_comments /etc/kdump.conf) > ${initdir}/tmp/$$-kdump.conf
while read _opt _val; while read _opt _val;
do do