From a7fda02d8811afaa4ebb521ffb724e8020ec8ceb Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 11 Mar 2016 15:59:49 -0800 Subject: [PATCH] Print lines copied into the generated script when tracing Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Compiler.pm | 2 +- Shorewall/Perl/Shorewall/Config.pm | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index 7492eeb69..42338dfbf 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -95,7 +95,7 @@ sub generate_script_1( $ ) { emit "#!$config{SHOREWALL_SHELL}\n#\n# Compiled firewall script generated by Shorewall $globals{VERSION} - $date\n#"; copy $globals{SHAREDIRPL} . '/lib.core', 0; - copy2 $globals{SHAREDIRPL} . '/lib.common', 0; + copy2 $globals{SHAREDIRPL} . '/lib.common', $debug; } } diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 827bce615..0df38027d 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2793,6 +2793,11 @@ sub copy( $ ) { print $script $_; print $script "\n"; $lastlineblank = 0; + + if ( $debug ) { + s/\n/\nGS-----> /g; + print "GS-----> $_\n"; + } } }