uci: implement a uci_toogle_state() wrapper in the shell api which calls uci_revert_state() before uci_set_state()

SVN-Revision: 27614
This commit is contained in:
Jo-Philipp Wich
2011-07-15 14:52:38 +00:00
parent e084d0e92a
commit 9ee12e3f62
2 changed files with 7 additions and 2 deletions

View 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"