mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-05 09:16:58 +02:00
Remove Kate workarounds from firewall script; cosmetic/typo fixes
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4196 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a6723cd6b2
commit
67bcdcc8eb
@ -43,7 +43,8 @@
|
|||||||
# Fatal error -- stops the compiler after issuing the error message
|
# Fatal error -- stops the compiler after issuing the error message
|
||||||
#
|
#
|
||||||
fatal_error() # $* = Error Message
|
fatal_error() # $* = Error Message
|
||||||
{ echo " ERROR: $@" >&2
|
{
|
||||||
|
echo " ERROR: $@" >&2
|
||||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||||
[ -n "$OUTPUT" ] && rm -f $OUTPUT
|
[ -n "$OUTPUT" ] && rm -f $OUTPUT
|
||||||
kill $$
|
kill $$
|
||||||
|
@ -213,7 +213,7 @@ flushmangle() # $1 = name of chain
|
|||||||
|
|
||||||
#
|
#
|
||||||
# This function assumes that the TMP_DIR variable is set and that
|
# This function assumes that the TMP_DIR variable is set and that
|
||||||
# its value named an existing directory.
|
# its value names an existing directory.
|
||||||
#
|
#
|
||||||
determine_zones()
|
determine_zones()
|
||||||
{
|
{
|
||||||
@ -462,28 +462,24 @@ iprange_echo()
|
|||||||
#
|
#
|
||||||
get_set_flags() # $1 = set name and optional [levels], $2 = src or dst
|
get_set_flags() # $1 = set name and optional [levels], $2 = src or dst
|
||||||
{
|
{
|
||||||
#
|
|
||||||
# Note: There is a lot of unnecessary evaluation in this function just so my text
|
|
||||||
# editor (kate) doesn't get lost trying to follow the shell syntax for highlighting.
|
|
||||||
#
|
|
||||||
local temp setname=$1 options=$2
|
local temp setname=$1 options=$2
|
||||||
|
|
||||||
[ -n "$IPSET_MATCH" ] || fatal_error "Your kernel and/or iptables does not include ipset match: $1"
|
[ -n "$IPSET_MATCH" ] || fatal_error "Your kernel and/or iptables does not include ipset match: $1"
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
*\[[1-6]\])
|
*\[[1-6]\])
|
||||||
eval temp='${1#*\[}'
|
temp=${1#*\[}
|
||||||
eval temp='${temp%\]}'
|
temp=${temp%\]}
|
||||||
eval setname='${1%\[*}'
|
setname=${1%\[*}
|
||||||
while [ $temp -gt 1 ]; do
|
while [ $temp -gt 1 ]; do
|
||||||
options="$options,$2"
|
options="$options,$2"
|
||||||
temp=$(($temp - 1))
|
temp=$(($temp - 1))
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
*\[*\])
|
*\[*\])
|
||||||
eval options='${1#*\[}'
|
options=${1#*\[}
|
||||||
eval options='${options%\]}'
|
options=${options%\]}
|
||||||
eval setname='${1%\[*}'
|
setname=${1%\[*}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
|
@ -1451,7 +1451,7 @@ log_rule_limit() # $1 = log level, $2 = chain, $3 = display Chain $4 = dispositi
|
|||||||
local prefix
|
local prefix
|
||||||
local base=$(chain_base $displayChain)
|
local base=$(chain_base $displayChain)
|
||||||
|
|
||||||
limit="${5:-$LOGLIMIT}"
|
limit="${5:-$LOGLIMIT}" # Do this here rather than in the declaration above to appease /bin/ash.
|
||||||
|
|
||||||
shift 7
|
shift 7
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user