mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03: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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user