mirror of
https://gitlab.com/shorewall/code.git
synced 2025-08-17 20:26:47 +02:00
Shorwall 1.4.0
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@507 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Shorewall 1.3 -- /usr/lib/shorewall/functions
|
||||
# Shorewall 1.4 -- /usr/lib/shorewall/functions
|
||||
|
||||
#
|
||||
# Suppress all output for a command
|
||||
#
|
||||
qt()
|
||||
{
|
||||
#
|
||||
qt()
|
||||
{
|
||||
"$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
@@ -25,15 +25,30 @@ find_file()
|
||||
#
|
||||
# Replace commas with spaces and echo the result
|
||||
#
|
||||
separate_list() {
|
||||
separate_list() {
|
||||
local list
|
||||
local part
|
||||
local newlist
|
||||
#
|
||||
# There's been whining about us not catching embedded white space in
|
||||
# comma-separated lists. This is an attempt to snag some of the cases.
|
||||
#
|
||||
# The 'terminator' function will be set by the 'firewall' script to
|
||||
# either 'startup_error' or 'fatal_error' depending on the command and
|
||||
# command phase
|
||||
#
|
||||
case "$@" in
|
||||
*,|,*|*,,*|*[[:space:]]*)
|
||||
[ -n "$terminator" ] && \
|
||||
$terminator "Invalid comma-separated list \"$@\""
|
||||
echo "Warning -- invalid comma-separated list \"$@\"" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
list="$@"
|
||||
part="${list%%,*}"
|
||||
newlist="$part"
|
||||
|
||||
|
||||
while [ "x$part" != "x$list" ]; do
|
||||
list="${list#*,}";
|
||||
part="${list%%,*}";
|
||||
@@ -69,7 +84,7 @@ find_display() # $1 = zone, $2 = name of the zone file
|
||||
done
|
||||
}
|
||||
|
||||
determine_zones()
|
||||
determine_zones()
|
||||
{
|
||||
local zonefile=`find_file zones`
|
||||
|
||||
|
Reference in New Issue
Block a user