forked from extern/shorewall_code
Don't indent the embedded scfilter file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5b86cbdabf
commit
b27fd07e9f
@ -354,7 +354,7 @@ sub generate_script_3($) {
|
|||||||
if ( -f $fn ) {
|
if ( -f $fn ) {
|
||||||
emit( '',
|
emit( '',
|
||||||
'cat << __EOF__ > ${VARDIR}/scfilter' );
|
'cat << __EOF__ > ${VARDIR}/scfilter' );
|
||||||
append_file $fn,1 or emit 'cat -';
|
append_file( $fn,1,1 ) or emit_unindented "#! /bin/sh\ncat -";
|
||||||
emit_unindented( "__EOF__\n" );
|
emit_unindented( "__EOF__\n" );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -3277,13 +3277,17 @@ sub propagateconfig() {
|
|||||||
# Add a shell script file to the output script -- Return true if the
|
# Add a shell script file to the output script -- Return true if the
|
||||||
# file exists and is not in /usr/share/shorewall/ and is non-empty.
|
# file exists and is not in /usr/share/shorewall/ and is non-empty.
|
||||||
#
|
#
|
||||||
sub append_file( $;$ ) {
|
sub append_file( $;$$ ) {
|
||||||
my $user_exit = find_file $_[0];
|
my ( $file, $nomsg, $unindented ) = @_;
|
||||||
|
my $user_exit = find_file $file;
|
||||||
my $result = 0;
|
my $result = 0;
|
||||||
|
my $save_indent = $indent;
|
||||||
|
|
||||||
|
$indent = '' if $unindented;
|
||||||
|
|
||||||
unless ( $user_exit =~ /^($globals{SHAREDIR})/ ) {
|
unless ( $user_exit =~ /^($globals{SHAREDIR})/ ) {
|
||||||
if ( -f $user_exit ) {
|
if ( -f $user_exit ) {
|
||||||
if ( $_[1] ) {
|
if ( $nomsg ) {
|
||||||
#
|
#
|
||||||
# Suppress progress message
|
# Suppress progress message
|
||||||
#
|
#
|
||||||
@ -3299,6 +3303,8 @@ sub append_file( $;$ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$indent = $save_indent;
|
||||||
|
|
||||||
$result;
|
$result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user