From: Steven Barth Date: Thu, 3 Apr 2008 10:10:48 +0000 (+0000) Subject: * Fixed firewall script X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=55c2ac261f7bc865cf7fc2abe6c69ffd87a098ac;p=openwrt-luci.git * Fixed firewall script --- diff --git a/contrib/init.d/luci_fw b/contrib/init.d/luci_fw index 766a5313de..880c87dbe3 100644 --- a/contrib/init.d/luci_fw +++ b/contrib/init.d/luci_fw @@ -9,7 +9,11 @@ apply_portfw() { config_get to "$cfg" to ports=$(echo $to | cut -sd: -f2) - [ -n "$ports" ] && ports="--dport $(echo $ports | sed -e 's/-/:/')" + if [ -n "$ports" ]; then + ports="--dport $(echo $ports | sed -e 's/-/:/')" + else + ports="--dport $dport" + fi ip=$(echo $to | cut -d: -f1)