From d3e94d44c3c5bf6395fedbab2a2013ce17affeb1 Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 17 Mar 2008 16:46:30 +0000 Subject: [PATCH] Add some progress messages; suppress output from 'tc add....mirred' git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8301 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Tc.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Shorewall-perl/Shorewall/Tc.pm b/Shorewall-perl/Shorewall/Tc.pm index 965b150ff..7f9e98176 100644 --- a/Shorewall-perl/Shorewall/Tc.pm +++ b/Shorewall-perl/Shorewall/Tc.pm @@ -571,6 +571,13 @@ sub process_tc_filter( $$$$$$ ) { '' ); progress_message " TC Filter \"$currentline\" $done"; + + $currentline =~ s/\s+/ /g; + + save_progress_message_short qq(" TC Filter \"$currentline\" defined."); + + emit ''; + } sub setup_traffic_shaping() { @@ -634,7 +641,7 @@ sub setup_traffic_shaping() { for my $rdev ( @{$devref->{redirected}} ) { emit ( "run_tc qdisc add dev $rdev handle ffff: ingress" ); - emit( "run_tc filter add dev $rdev parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev $device" ); + emit( "run_tc filter add dev $rdev parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev $device > /dev/null" ); } save_progress_message_short " TC Device $device defined."; @@ -704,7 +711,7 @@ sub setup_traffic_shaping() { $fn = open_file 'tcfilters'; if ( $fn ) { - first_entry "$doing $fn..."; + first_entry( sub { progress_message2 "$doing $fn..."; save_progress_message "Adding TC Filters"; } ); while ( read_a_line ) {