mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-15 10:51:02 +01:00
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 ) {
|
||||
emit( '',
|
||||
'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" );
|
||||
}
|
||||
} else {
|
||||
|
@ -3277,13 +3277,17 @@ sub propagateconfig() {
|
||||
# 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.
|
||||
#
|
||||
sub append_file( $;$ ) {
|
||||
my $user_exit = find_file $_[0];
|
||||
sub append_file( $;$$ ) {
|
||||
my ( $file, $nomsg, $unindented ) = @_;
|
||||
my $user_exit = find_file $file;
|
||||
my $result = 0;
|
||||
my $save_indent = $indent;
|
||||
|
||||
$indent = '' if $unindented;
|
||||
|
||||
unless ( $user_exit =~ /^($globals{SHAREDIR})/ ) {
|
||||
if ( -f $user_exit ) {
|
||||
if ( $_[1] ) {
|
||||
if ( $nomsg ) {
|
||||
#
|
||||
# Suppress progress message
|
||||
#
|
||||
@ -3299,6 +3303,8 @@ sub append_file( $;$ ) {
|
||||
}
|
||||
}
|
||||
|
||||
$indent = $save_indent;
|
||||
|
||||
$result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user