[backfire] backport r27614
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 15 Jul 2011 14:54:45 +0000 (14:54 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 15 Jul 2011 14:54:45 +0000 (14:54 +0000)
SVN-Revision: 27615

package/uci/Makefile
package/uci/files/lib/config/uci.sh

index 7210ca29ad94f60cb4a281dc2c5a775421db15bd..4309f2a0d9dc1514b1a70f7f576f82eb0bff9381 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008 OpenWrt.org
+# Copyright (C) 2008-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -12,7 +12,7 @@ UCI_RELEASE=6
 
 PKG_NAME:=uci
 PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_REV:=aa3ab8012bfbf793d2884c08ea924545a04e9544
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index 8dcb92b9f87d2febb75efb01d36e7260cb3dc159..db84c8343e164c7ec021106eba1d74291e7f6817 100644 (file)
@@ -71,6 +71,11 @@ uci_set_state() {
        /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -P /var/state set "$PACKAGE.$CONFIG${OPTION:+.$OPTION}=$VALUE"
 }
 
+uci_toggle_state() {
+       uci_revert_state "$1" "$2" "$3"
+       uci_set_state "$1" "$2" "$3" "$4"
+}
+
 uci_set() {
        local PACKAGE="$1"
        local CONFIG="$2"