diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-03-30 20:29:17 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-03-30 20:29:17 +0000 |
commit | b12a3e34a3cc1a92850a377c95296b2fb1f74133 (patch) | |
tree | 46f0fdf9096b7eea9e2d77f9f11b96f16f64ad61 /package/firewall/files | |
parent | a2c0b00b000f71f21ac7346d7a605e3a39e4c63b (diff) |
[package] firewall: prevent duplicate values in interface state vars
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26382 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall/files')
-rw-r--r-- | package/firewall/files/lib/core_interface.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/firewall/files/lib/core_interface.sh b/package/firewall/files/lib/core_interface.sh index aff664180..ed6a4b150 100644 --- a/package/firewall/files/lib/core_interface.sh +++ b/package/firewall/files/lib/core_interface.sh @@ -4,7 +4,10 @@ fw__uci_state_add() { local var="$1" local item="$2" - local val="$(uci_get_state firewall core $var)" + local val=" $(uci_get_state firewall core $var) " + val="${val// $item / }" + val="${val# }" + val="${val% }" uci_set_state firewall core $var "${val:+$val }$item" } |