Much ado about nothing (extraneous whitespace removal)

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5707 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-26 23:17:46 +00:00
parent a8231a26b8
commit 85ad25cb68
19 changed files with 392 additions and 391 deletions

View File

@ -324,7 +324,6 @@ sub process_actions1() {
} }
progress_message " ..End Macro"; progress_message " ..End Macro";
close M; close M;
} else { } else {
fatal_error "Invalid TARGET ($target) in rule \"$line\""; fatal_error "Invalid TARGET ($target) in rule \"$line\"";

View File

@ -112,6 +112,7 @@ sub add_group_to_zone($$$$$)
# #
# Parse the interfaces file. # Parse the interfaces file.
# #
sub validate_interfaces_file() sub validate_interfaces_file()
{ {
my %validoptions = (arp_filter => 1, my %validoptions = (arp_filter => 1,

View File

@ -392,8 +392,10 @@ sub setup_providers() {
'fi', 'fi',
'' ); '' );
} else { } else {
emit "#\n# We don't have any 'balance' providers so we restore any default route that we've saved\n#"; emitj( '#',
emit 'restore_default_route'; '# We don\'t have any \'balance\' providers so we restore any default route that we\'ve saved',
'#',
'restore_default_route' );
} }
emit 'cat > /etc/iproute2/rt_tables <<EOF'; emit 'cat > /etc/iproute2/rt_tables <<EOF';

View File

@ -796,7 +796,7 @@ sub process_rule1 ( $$$$$$$$$ ) {
if ( $actiontype == MACRO ) { if ( $actiontype == MACRO ) {
process_macro process_macro
$macros{$basictarget}, $macros{$basictarget},
target , $target ,
$param , $param ,
$source, $source,
$dest, $dest,
@ -1220,6 +1220,7 @@ sub generate_matrix() {
add_rule $chainref , join( '', "-i $interface ", match_source_net( $host ), '-j RETURN' ); add_rule $chainref , join( '', "-i $interface ", match_source_net( $host ), '-j RETURN' );
} }
} }
# #
# Generate_Matrix() Starts Here # Generate_Matrix() Starts Here
# #

View File

@ -265,7 +265,6 @@ sub rate_to_kbit( $ ) {
sub calculate_quantum( $ ) { sub calculate_quantum( $ ) {
my $rate = rate_to_kbit $_[0]; my $rate = rate_to_kbit $_[0];
eval "int( ( $rate * 128 ) / $r2q )"; eval "int( ( $rate * 128 ) / $r2q )";
} }
@ -364,7 +363,6 @@ sub setup_traffic_shaping() {
fatal_error "Invalid tcdevices entry: \"$line\"" if $outband eq '-'; fatal_error "Invalid tcdevices entry: \"$line\"" if $outband eq '-';
validate_tc_device( $device, $inband, $outband ); validate_tc_device( $device, $inband, $outband );
} }
} }
close TD; close TD;
@ -381,7 +379,6 @@ sub setup_traffic_shaping() {
validate_tc_class( $device, $mark, $rate, $ceil, $prio, $options ); validate_tc_class( $device, $mark, $rate, $ceil, $prio, $options );
} }
} }
close TC; close TC;

View File

@ -58,11 +58,7 @@ use Shorewall::Accounting;
use Shorewall::Rules; use Shorewall::Rules;
use Shorewall::Proc; use Shorewall::Proc;
use Shorewall::Proxyarp; use Shorewall::Proxyarp;
#
# Emacs doesn't handle 'here documents' in Perl Mode nearly as well as it does in Shell mode
# (it basically doesn't understand it at all and gets lost). So I use a number of rather
# awkward styles in place of 'here docs'.
#
sub generate_script_1 { sub generate_script_1 {
copy $env{SHAREDIRPL} . 'prog.header'; copy $env{SHAREDIRPL} . 'prog.header';
@ -77,7 +73,6 @@ sub generate_script_1 {
'PRODUCT="Shorewall Lite"' ); 'PRODUCT="Shorewall Lite"' );
copy "$env{SHAREDIR}/lib.base"; copy "$env{SHAREDIR}/lib.base";
emitj ( '################################################################################', emitj ( '################################################################################',
'# End of /usr/share/shorewall/lib.base', '# End of /usr/share/shorewall/lib.base',
'################################################################################' ); '################################################################################' );
@ -164,7 +159,7 @@ sub generate_script_1 {
sub compile_stop_firewall() { sub compile_stop_firewall() {
emit " emit <<EOF;
# #
# Stop/restore the firewall after an error or because of a 'stop' or 'clear' command # Stop/restore the firewall after an error or because of a 'stop' or 'clear' command
# #
@ -302,7 +297,9 @@ stop_firewall() {
done done
fi fi
rm -f \${VARDIR}/proxyarp\n"; rm -f \${VARDIR}/proxyarp
EOF
emit ' delete_tc1' if $config{CLEAR_TC}; emit ' delete_tc1' if $config{CLEAR_TC};
emit ' undo_routing'; emit ' undo_routing';
@ -314,8 +311,10 @@ stop_firewall() {
if ( $config{ADMINISABSENTMINDED} ) { if ( $config{ADMINISABSENTMINDED} ) {
emitj ( ' for chain in INPUT OUTPUT; do', emitj ( ' for chain in INPUT OUTPUT; do',
' setpolicy $chain ACCEPT', ' setpolicy $chain ACCEPT',
" done\n", ' done',
" setpolicy FORWARD DROP\n", '',
' setpolicy FORWARD DROP',
'',
' deleteallchains', ' deleteallchains',
'' ); '' );
@ -417,7 +416,7 @@ stop_firewall() {
pop_indent; pop_indent;
emit " emit <<EOF;
set_state \"Stopped\" set_state \"Stopped\"
logger -p kern.info \"\$PRODUCT Stopped\" logger -p kern.info \"\$PRODUCT Stopped\"
@ -434,7 +433,9 @@ stop_firewall() {
kill \$\$ kill \$\$
;; ;;
esac esac
}\n"; }
EOF
} }