summaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-04-03 10:10:48 +0000
committerSteven Barth <steven@midlink.org>2008-04-03 10:10:48 +0000
commit55c2ac261f7bc865cf7fc2abe6c69ffd87a098ac (patch)
tree688509db38babb33f7582ba36b16671e6c0f694f /contrib
parent7815fbedcd4e1a28ebe4fa832d2b2b6a9185ca34 (diff)
* Fixed firewall script
Diffstat (limited to 'contrib')
-rw-r--r--contrib/init.d/luci_fw6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/init.d/luci_fw b/contrib/init.d/luci_fw
index 766a5313d..880c87dbe 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)