diff --git a/Shorewall/compiler b/Shorewall/compiler index da5908aac..51ab207f5 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -6430,6 +6430,7 @@ __EOF__ esac if [ "$addrlist" = '$addrlist' ]; then + addresses='$(combine_list $addresses)' indent >&3 << __EOF__ addrlist= @@ -8241,6 +8242,25 @@ ensure_and_save_command() { eval \$@ || fatal_error "Command \"\$@\" failed" } +__EOF__ + # + # The following function(s) can be removed when we require version 30192 (below) + # + cat >&3 << __EOF__ +# +# Undo the effect of 'separate_list()' +# +combine_list() +{ + local f o= + + for f in \$* ; do + o="\${o:+\$o,}\$f" + done + + echo \$o +} + # # Initialize environment # diff --git a/Shorewall/functions b/Shorewall/functions index 8d55695a0..4c57e8a1b 100644 --- a/Shorewall/functions +++ b/Shorewall/functions @@ -26,7 +26,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA -LIBVERSION=30191 +LIBVERSION=30192 [ -n "${VARDIR:=/var/lib/shorewall}" ] [ -n "${SHAREDIR:=/usr/share/shorewall}" ] @@ -365,6 +365,20 @@ separate_list() { echo "$newlist" } +# +# Undo the effect of 'separate_list()' +# +combine_list() +{ + local f o= + + for f in $* ; do + o="${o:+$o,}$f" + done + + echo $o +} + # # Load a Kernel Module #