a) Rewrote 'list_count' to not require 'wc'

b) Turn off trace after error
c) Allow output ICMP unconditionally again


git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@350 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2002-12-04 23:53:03 +00:00
parent 0f33d5af0d
commit 14a20ece71

View File

@ -61,9 +61,11 @@ list_search() # $1 = element to search for , $2-$n = list
# Function to count list elements # Function to count list elements
# #
list_count() { list_count() {
local temp="`separate_list $1`" arg_count() {
echo $#
echo $temp | wc -w }
arg_count `separate_list $1`
} }
# #
@ -1103,6 +1105,17 @@ run_user_exit() # $1 = file name
# Stop the Firewall # Stop the Firewall
# #
stop_firewall() { stop_firewall() {
#
# Turn off trace unless we were tracing "stop" or "clear"
#
case $command in
stop|clear)
;;
*)
set +x
;;
esac
stopping="Yes" stopping="Yes"
deletechain shorewall deletechain shorewall
@ -3386,7 +3399,7 @@ add_common_rules() {
# #
# Enable icmp output # Enable icmp output
# #
run_iptables -A OUTPUT -m state --state ! INVALID -p icmp -j ACCEPT run_iptables -A OUTPUT -p icmp -j ACCEPT
# #
# Route Filtering # Route Filtering
# #