Suppress duplicate progress messages

This commit is contained in:
Tom Eastep 2009-05-29 07:03:24 -07:00
parent c5667c7658
commit f2cb2cca9e
2 changed files with 6 additions and 7 deletions

View File

@ -471,7 +471,7 @@ sub generate_script_3($) {
fi
EOF
pop_indent;
setup_forwarding( $family );
setup_forwarding( $family , 1 );
push_indent;
emit<<'EOF';
set_state "Started"
@ -480,7 +480,7 @@ else
if [ $COMMAND = refresh ]; then
chainlist_reload
EOF
setup_forwarding( $family );
setup_forwarding( $family , 0 );
emit<<'EOF';
run_refreshed_exit
do_iptables -N shorewall
@ -490,7 +490,7 @@ EOF
restore_dynamic_rules
conditionally_flush_conntrack
EOF
setup_forwarding( $family );
setup_forwarding( $family , 0 );
emit<<'EOF';
run_start_exit
do_iptables -N shorewall

View File

@ -192,8 +192,8 @@ sub setup_source_routing( $ ) {
}
}
sub setup_forwarding( $ ) {
my $family = shift;
sub setup_forwarding( $$ ) {
my ( $family, $first ) = @_;
if ( $family == F_IPV4 ) {
if ( $config{IP_FORWARDING} eq 'on' ) {
@ -219,12 +219,11 @@ sub setup_forwarding( $ ) {
my $interfaces = find_interfaces_by_option 'forward';
if ( @$interfaces ) {
progress_message2 "$doing Interface forwarding...";
push_indent;
push_indent;
save_progress_message 'Setting up IPv6 Interface Forwarding...';
save_progress_message 'Setting up IPv6 Interface Forwarding...' if $first;
for my $interface ( @$interfaces ) {
my $file = "/proc/sys/net/ipv6/conf/$interface/forwarding";