mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-22 07:33:43 +01:00
Don't display chains with no matched entries when -b
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
59a75512be
commit
f24e194819
@ -678,7 +678,12 @@ show_command() {
|
||||
|
||||
# eliminates rules which have not been used from ip*tables' output
|
||||
brief_output() {
|
||||
grep -Eve '^ +0 +0 +'
|
||||
awk \
|
||||
'/^Chain / { heading1 = $0; getline heading2; printed = 0; next; };
|
||||
/^ +0 +0 / { next; };
|
||||
/^$/ { if ( printed == 1 ) { print $0; }; next; };
|
||||
{ if ( printed == 0 ) { print heading1; print heading2; printed = 1 }; };
|
||||
{ print; }';
|
||||
}
|
||||
|
||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||
|
@ -843,11 +843,11 @@
|
||||
Netfilter table to display. The default is <emphasis
|
||||
role="bold">filter</emphasis>.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-b</emphasis> ('brief')
|
||||
option causes rules which have not been used (i.e. which
|
||||
have zero packet and byte counts) to be omitted from the
|
||||
output. In the future, this may be extended to omit unused
|
||||
chains entirely.</para>
|
||||
<para>The <emphasis role="bold">-b</emphasis> ('brief') option
|
||||
causes rules which have not been used (i.e. which have zero
|
||||
packet and byte counts) to be omitted from the output. Chains
|
||||
with no rules displayed are also omitted from the
|
||||
output.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-l</emphasis> option causes
|
||||
the rule number for each Netfilter rule to be
|
||||
|
@ -1398,9 +1398,9 @@
|
||||
|
||||
<para>The <emphasis role="bold">-b</emphasis> ('brief') option
|
||||
causes rules which have not been used (i.e. which have zero
|
||||
packet and byte counts) to be omitted from the output. In the
|
||||
future, this may be extended to omit unused chains
|
||||
entirely.</para>
|
||||
packet and byte counts) to be omitted from the output. Chains
|
||||
with no rules displayed are also omitted from the
|
||||
output.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-l</emphasis> option causes
|
||||
the rule number for each Netfilter rule to be
|
||||
|
@ -841,11 +841,11 @@
|
||||
Netfilter table to display. The default is <emphasis
|
||||
role="bold">filter</emphasis>.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-b</emphasis> ('brief')
|
||||
option causes rules which have not been used (i.e. which
|
||||
have zero packet and byte counts) to be omitted from the
|
||||
output. In the future, this may be extended to omit unused
|
||||
chains entirely.</para>
|
||||
<para>The <emphasis role="bold">-b</emphasis> ('brief') option
|
||||
causes rules which have not been used (i.e. which have zero
|
||||
packet and byte counts) to be omitted from the output. Chains
|
||||
with no rules displayed are also omitted from the
|
||||
output.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-l</emphasis> option causes
|
||||
the rule number for each Netfilter rule to be
|
||||
|
@ -1277,11 +1277,11 @@
|
||||
Netfilter table to display. The default is <emphasis
|
||||
role="bold">filter</emphasis>.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-b</emphasis> ('brief')
|
||||
option causes rules which have not been used (i.e. which
|
||||
have zero packet and byte counts) to be omitted from the
|
||||
output. In the future, this may be extended to omit unused
|
||||
chains entirely.</para>
|
||||
<para>The <emphasis role="bold">-b</emphasis> ('brief') option
|
||||
causes rules which have not been used (i.e. which have zero
|
||||
packet and byte counts) to be omitted from the output. Chains
|
||||
with no rules displayed are also omitted from the
|
||||
output.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-l</emphasis> option causes
|
||||
the rule number for each Netfilter rule to be
|
||||
|
Loading…
Reference in New Issue
Block a user