From 38b8a8a7fdd2117a44f4ac0ade47c6ad1aeda061 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 12 Jan 2010 19:09:46 -0800 Subject: [PATCH] Allow Shorewall6 to display the tc config of one interface Signed-off-by: Tom Eastep --- Shorewall6/lib.cli | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Shorewall6/lib.cli b/Shorewall6/lib.cli index 86f0edad1..ea2d8032b 100644 --- a/Shorewall6/lib.cli +++ b/Shorewall6/lib.cli @@ -158,9 +158,13 @@ show_tc() { fi } - ip -o link list | while read inx interface details; do - show_one_tc ${interface%:} - done + if [ $# -gt 0 ]; then + show_one_tc $1 + else + ip -o link list | while read inx interface details; do + show_one_tc ${interface%:} + done + fi } @@ -450,7 +454,7 @@ show_command() { packet_log 20 ;; tc) - [ $# -gt 1 ] && usage 1 + [ $# -gt 2 ] && usage 1 echo "$PRODUCT $version Traffic Control at $HOSTNAME - $(date)" echo show_tc