X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ba53471109641d735aaee426e4dd39accc6d02ac..271da7f4e93492f377c0fcf25def4591d60b9fbc:/package/firewall/files/lib/core_interface.sh 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" }