Reformat preceding patch and correct syntax errors.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2014-02-25 13:21:23 -08:00
parent 66fdc9f6a7
commit 454e53bcfa

View File

@ -2997,6 +2997,8 @@ sub embedded_shell( $ ) {
fatal_error "INCLUDEs nested too deeply" if @includestack >= 4; fatal_error "INCLUDEs nested too deeply" if @includestack >= 4;
my ( $command, $linenumber ) = ( "/bin/sh -c '$currentline", $currentlinenumber ); my ( $command, $linenumber ) = ( "/bin/sh -c '$currentline", $currentlinenumber );
$directive_callback->( 'SHELL', $currentline ) if $directive_callback;
if ( $multiline ) { if ( $multiline ) {
# #
# Multi-line script # Multi-line script
@ -3007,6 +3009,7 @@ sub embedded_shell( $ ) {
my $last = 0; my $last = 0;
while ( read_a_line( PLAIN_READ ) ) { while ( read_a_line( PLAIN_READ ) ) {
$directive_callback->( 'SHELL', $currentline ) if $directive_callback;
last if $last = $currentline =~ s/^\s*\??END(\s+SHELL)?\s*(?:;\s*)?$//i; last if $last = $currentline =~ s/^\s*\??END(\s+SHELL)?\s*(?:;\s*)?$//i;
$command .= "$currentline\n"; $command .= "$currentline\n";
} }
@ -3031,6 +3034,8 @@ sub embedded_perl( $ ) {
my ( $command , $linenumber ) = ( qq(package Shorewall::User;\nno strict;\nuse Shorewall::Config (qw/shorewall/);\n# line $currentlinenumber "$currentfilename"\n$currentline), $currentlinenumber ); my ( $command , $linenumber ) = ( qq(package Shorewall::User;\nno strict;\nuse Shorewall::Config (qw/shorewall/);\n# line $currentlinenumber "$currentfilename"\n$currentline), $currentlinenumber );
$directive_callback->( 'PERL', $currentline ) if $directive_callback;
if ( $multiline ) { if ( $multiline ) {
# #
# Multi-line script # Multi-line script
@ -3041,6 +3046,7 @@ sub embedded_perl( $ ) {
my $last = 0; my $last = 0;
while ( read_a_line( PLAIN_READ ) ) { while ( read_a_line( PLAIN_READ ) ) {
$directive_callback->( 'PERL', $currentline ) if $directive_callback;
last if $last = $currentline =~ s/^\s*\??END(\s+PERL)?\s*(?:;\s*)?//i; last if $last = $currentline =~ s/^\s*\??END(\s+PERL)?\s*(?:;\s*)?//i;
$command .= "$currentline\n"; $command .= "$currentline\n";
} }