[tw]
- dropped new status patch - integration directly in the config file and init script
This commit is contained in:
parent
e62f16132b
commit
adba868b0a
@ -36,3 +36,13 @@ IPTABLES_SAVE_COUNTER="no"
|
|||||||
# Print IP addresses and port numbers in numeric format in the status output.
|
# Print IP addresses and port numbers in numeric format in the status output.
|
||||||
IPTABLES_STATUS_NUMERIC="yes"
|
IPTABLES_STATUS_NUMERIC="yes"
|
||||||
|
|
||||||
|
# Verbose status output
|
||||||
|
# Value: yes|no, default: yes
|
||||||
|
# Print info about the number of packets and bytes plus the "input-" and
|
||||||
|
# "outputdevice" in the status output.
|
||||||
|
IPTABLES_STATUS_VERBOSE="no"
|
||||||
|
|
||||||
|
# Status output with numbered lines
|
||||||
|
# Value: yes|no, default: yes
|
||||||
|
# Print a counter/number for every rule in the status output.
|
||||||
|
IPTABLES_STATUS_LINENUMBERS="yes"
|
||||||
|
@ -244,10 +244,12 @@ save() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
status() {
|
status() {
|
||||||
|
tables=`cat $PROC_IPTABLES_NAMES 2>/dev/null`
|
||||||
|
|
||||||
# Do not print status if lockfile is missing and iptables modules are not
|
# Do not print status if lockfile is missing and iptables modules are not
|
||||||
# loaded.
|
# loaded.
|
||||||
# Check if iptable module is loaded
|
# Check if iptable module is loaded
|
||||||
if [ ! -f "$VAR_SUBSYS_IPTABLES" ]; then
|
if [ ! -f "$VAR_SUBSYS_IPTABLES" -a -z "$tables" ]; then
|
||||||
echo $"Firewall is stopped."
|
echo $"Firewall is stopped."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -257,7 +259,6 @@ status() {
|
|||||||
echo $"Firewall is not configured. "
|
echo $"Firewall is not configured. "
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
tables=`cat $PROC_IPTABLES_NAMES 2>/dev/null`
|
|
||||||
if [ -z "$tables" ]; then
|
if [ -z "$tables" ]; then
|
||||||
echo $"Firewall is not configured. "
|
echo $"Firewall is not configured. "
|
||||||
return 1
|
return 1
|
||||||
@ -265,10 +266,14 @@ status() {
|
|||||||
|
|
||||||
NUM=
|
NUM=
|
||||||
[ "x$IPTABLES_STATUS_NUMERIC" = "xyes" ] && NUM="-n"
|
[ "x$IPTABLES_STATUS_NUMERIC" = "xyes" ] && NUM="-n"
|
||||||
|
VERBOSE=
|
||||||
|
[ "x$IPTABLES_STATUS_VERBOSE" = "xyes" ] && VERBOSE="--verbose"
|
||||||
|
COUNT=
|
||||||
|
[ "x$IPTABLES_STATUS_LINENUMBERS" = "xyes" ] && COUNT="--line-numbers"
|
||||||
|
|
||||||
for table in $tables; do
|
for table in $tables; do
|
||||||
echo $"Table: $table"
|
echo $"Table: $table"
|
||||||
$IPTABLES -t $table --list $NUM && echo
|
$IPTABLES -t $table --list $NUM $VERBOSE $COUNT && echo
|
||||||
done
|
done
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
@ -14,7 +14,6 @@ Patch6: iptables-1.2.10-counters.patch
|
|||||||
Patch8: iptables-1.3.0-cleanup.patch
|
Patch8: iptables-1.3.0-cleanup.patch
|
||||||
Patch9: iptables-1.3.0-autoload.patch
|
Patch9: iptables-1.3.0-autoload.patch
|
||||||
Patch10: iptables-1.3.0-no_root.patch
|
Patch10: iptables-1.3.0-no_root.patch
|
||||||
Patch11: iptables-1.3.4-status.patch
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://www.netfilter.org/
|
URL: http://www.netfilter.org/
|
||||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-buildroot
|
||||||
@ -68,7 +67,6 @@ rm -rf %{buildroot}
|
|||||||
%patch8 -p1 -b .cleanup
|
%patch8 -p1 -b .cleanup
|
||||||
%patch9 -p1 -b .autoload
|
%patch9 -p1 -b .autoload
|
||||||
%patch10 -p1 -b .no_root
|
%patch10 -p1 -b .no_root
|
||||||
%patch11 -p1 -b .status
|
|
||||||
|
|
||||||
# Put it to a reasonable place
|
# Put it to a reasonable place
|
||||||
find . -type f -exec perl -pi -e "s,/usr/local,%{prefix},g" {} \;
|
find . -type f -exec perl -pi -e "s,/usr/local,%{prefix},g" {} \;
|
||||||
|
Loading…
Reference in New Issue
Block a user