mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-23 11:11:32 +02:00
Modify Roberto's patch for 'show <chain>' error reporting
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8baa4e60c9
commit
e690303937
@ -710,9 +710,7 @@ show_command() {
|
|||||||
|
|
||||||
[ -n "$table_given" ] || for chain in $*; do
|
[ -n "$table_given" ] || for chain in $*; do
|
||||||
if ! qt $IPTABLES -t $table -L $chain $IPT_OPTIONS; then
|
if ! qt $IPTABLES -t $table -L $chain $IPT_OPTIONS; then
|
||||||
echo "ERROR: Chain '$chain' is not recognized by $IPTABLES."
|
error_message "ERROR: Chain '$chain' is not recognized by $IPTABLES."
|
||||||
echo ""
|
|
||||||
echo "usage $(basename $0) show [ -x ] [ -m ] [-f] [ -t {filter|mangle|nat} ] [ {chain [<chain> [ <chain> ... ]|actions|capabilities|classifiers|config|connections|dynamic <zone>|filters|ip|log|macros|mangle|nat|routing|tc|zones} ] " >&2
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -587,9 +587,7 @@ show_command() {
|
|||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
[ -n "$table_given" ] || for chain in $*; do
|
[ -n "$table_given" ] || for chain in $*; do
|
||||||
if ! qt $IP6TABLES -t $table -L $chain $IPT_OPTIONS; then
|
if ! qt $IP6TABLES -t $table -L $chain $IPT_OPTIONS; then
|
||||||
echo "ERROR: Chain '$chain' is not recognized by $IP6TABLES."
|
error_message "ERROR: Chain '$chain' is not recognized by $IP6TABLES."
|
||||||
echo ""
|
|
||||||
echo "usage $(basename $0) show [ -x ] [ -m ] [-f] [ -t {filter|mangle} ] [ {chain [<chain> [ <chain> ... ]|actions|capabilities|classifiers|config|connections|filters|ip|log|macros|mangle|routing|tc|zones} ] " >&2
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user