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 --- dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index b18f348..e2315d5 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -487,7 +487,7 @@ adjust_bind_mount_path() #install kdump.conf and what user specifies in kdump.conf kdump_install_conf() { 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; do
在 2020年03月12日 14:18, Kairui Song 写道:
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
dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index b18f348..e2315d5 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -487,7 +487,7 @@ adjust_bind_mount_path() #install kdump.conf and what user specifies in kdump.conf kdump_install_conf() { 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; do
This looks good.
Acked-by: Lianbo Jiang lijiang@redhat.com