From 51d4bf19b5686aa10378d78ba90eee42fcee98a0 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 29 Mar 2010 11:56:06 -0700 Subject: [PATCH] Conditionally trace writes by copy2(). Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Compiler.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index 0f85cac85..a8573d5f1 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -96,14 +96,15 @@ sub generate_script_1( $ ) { copy $globals{SHAREDIRPL} . 'prog.header6'; } - copy2 $globals{SHAREDIR} . '/lib.common'; + copy2 $globals{SHAREDIR} . '/lib.common', 0; } - my $lib = find_file 'lib.private'; - - copy2 $lib if -f $lib; } + my $lib = find_file 'lib.private'; + + copy2( $lib, $debug ) if -f $lib; + emit <<'EOF'; ################################################################################ # Functions to execute the various user exits (extension scripts)