1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 05:34:36 +02:00

[package] firewall: prevent duplicate values in interface state vars

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26382 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2011-03-30 20:29:17 +00:00
parent a2c0b00b00
commit b12a3e34a3
2 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=firewall
PKG_VERSION:=2
PKG_RELEASE:=23
PKG_RELEASE:=24
include $(INCLUDE_DIR)/package.mk

View File

@ -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"
}