From 595e3b9a3e4dfb01da3617a2a7134e2ca1e6a204 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 1 Sep 2016 13:42:04 +0200 Subject: scripts/functions: do not add a line feed after an empty section Otherwise we fill the config.rc file with empty lines each time a section is added then removed. --- sbin/init.d/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/init.d/functions b/sbin/init.d/functions index 0f79ec6..f4b4ca3 100644 --- a/sbin/init.d/functions +++ b/sbin/init.d/functions @@ -1450,7 +1450,7 @@ norm_cfg() { print $0; sec=1; } \ else print " " $0; \ } \ - END { print ""; }' + END { if (NR) print ""; }' } # source configuration file, called last. -- 1.7.12.1