forked from extern/shorewall_code
Avoid dropping first line of library source text
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
2d458b46b4
commit
88447bfc7d
@ -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;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#
|
||||
# This library contains the wrapper code for running a generated script.
|
||||
#
|
||||
|
||||
#
|
||||
# Get the Shorewall version of the passed script
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user