mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-16 19:54:04 +02:00
[package] uci: implement a uci_toogle_state() wrapper in the shell api which calls uci_revert_state() before uci_set_state()
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27614 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d8c92115a2
commit
f954a1beaa
@ -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.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -12,7 +12,7 @@ UCI_RELEASE=2
|
|||||||
|
|
||||||
PKG_NAME:=uci
|
PKG_NAME:=uci
|
||||||
PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
|
PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_REV:=5b6e96336d6a615a72c274cceaea8c2fe74d7642
|
PKG_REV:=5b6e96336d6a615a72c274cceaea8c2fe74d7642
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
@ -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"
|
/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() {
|
uci_set() {
|
||||||
local PACKAGE="$1"
|
local PACKAGE="$1"
|
||||||
local CONFIG="$2"
|
local CONFIG="$2"
|
||||||
|
Loading…
Reference in New Issue
Block a user