Avoid dropping first line of library source text

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-03-06 08:45:21 -08:00
parent 2d458b46b4
commit 88447bfc7d
2 changed files with 2 additions and 3 deletions

View File

@ -1208,13 +1208,11 @@ sub copy2( $ ) {
if ( $script ) {
my $file = $_[0];
my $first = 1;
open IF , $file or fatal_error "Unable to open $file: $!";
while ( <IF> ) {
last unless /^#/;
$first = 0;
}
print $script <<EOF;
@ -1223,7 +1221,7 @@ sub copy2( $ ) {
################################################################################
EOF
print $script $_ if $first;
print $script $_ unless /^\s*$/;
while ( <IF> ) {
chomp;

View File

@ -23,6 +23,7 @@
#
# This library contains the wrapper code for running a generated script.
#
#
# Get the Shorewall version of the passed script
#