diff --git a/Shorewall/firewall b/Shorewall/firewall index 96bc52ab1..26197ee10 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -1183,7 +1183,6 @@ stop_firewall() { iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT - for interface in `find_interfaces_by_option dhcp`; do iptables -A INPUT -p udp -i $interface --dport 67:68 -j ACCEPT iptables -A OUTPUT -p udp -o $interface --dport 67:68 -j ACCEPT diff --git a/Shorewall/functions b/Shorewall/functions index 340c0d9b2..90ad27b35 100755 --- a/Shorewall/functions +++ b/Shorewall/functions @@ -25,9 +25,22 @@ find_file() # # Replace commas with spaces and echo the result # -separate_list() -{ - echo $1 | sed 's/,/ /g' +separate_list() { + local list + local part + local newlist + + list="$@" + part="${list%%,*}" + newlist="$part" + + while [ "x$part" != "x$list" ]; do + list="${list#*,}"; + part="${list%%,*}"; + newlist="$newlist $part"; + done + + echo "$newlist" } #