From e69030393756cda860a832a70b1fd5c9022aab7e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 20 Feb 2010 19:09:54 -0800 Subject: [PATCH] Modify Roberto's patch for 'show ' error reporting Signed-off-by: Tom Eastep --- Shorewall/lib.cli | 4 +--- Shorewall6/lib.cli | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli index 4e00a097c..454ae1a97 100644 --- a/Shorewall/lib.cli +++ b/Shorewall/lib.cli @@ -710,9 +710,7 @@ show_command() { [ -n "$table_given" ] || for chain in $*; do if ! qt $IPTABLES -t $table -L $chain $IPT_OPTIONS; then - echo "ERROR: Chain '$chain' is not recognized by $IPTABLES." - echo "" - echo "usage $(basename $0) show [ -x ] [ -m ] [-f] [ -t {filter|mangle|nat} ] [ {chain [ [ ... ]|actions|capabilities|classifiers|config|connections|dynamic |filters|ip|log|macros|mangle|nat|routing|tc|zones} ] " >&2 + error_message "ERROR: Chain '$chain' is not recognized by $IPTABLES." exit 1 fi done diff --git a/Shorewall6/lib.cli b/Shorewall6/lib.cli index 94b11e829..c49abe0fc 100644 --- a/Shorewall6/lib.cli +++ b/Shorewall6/lib.cli @@ -587,9 +587,7 @@ show_command() { if [ $# -gt 0 ]; then [ -n "$table_given" ] || for chain in $*; do if ! qt $IP6TABLES -t $table -L $chain $IPT_OPTIONS; then - echo "ERROR: Chain '$chain' is not recognized by $IP6TABLES." - echo "" - echo "usage $(basename $0) show [ -x ] [ -m ] [-f] [ -t {filter|mangle} ] [ {chain [ [ ... ]|actions|capabilities|classifiers|config|connections|filters|ip|log|macros|mangle|routing|tc|zones} ] " >&2 + error_message "ERROR: Chain '$chain' is not recognized by $IP6TABLES." exit 1 fi done