diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-07-15 14:52:38 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-07-15 14:52:38 +0000 |
commit | f954a1beaac67b419c05ab6058afd8399039492e (patch) | |
tree | fd5d22eebdda5fbe2818fe6cacda0e53b5e71c5b /package/uci/files | |
parent | d8c92115a260f966ed4efc8043887bfca6e3d8d3 (diff) |
[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
Diffstat (limited to 'package/uci/files')
-rw-r--r-- | package/uci/files/lib/config/uci.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/package/uci/files/lib/config/uci.sh b/package/uci/files/lib/config/uci.sh index 8dcb92b9f8..db84c8343e 100644 --- a/package/uci/files/lib/config/uci.sh +++ b/package/uci/files/lib/config/uci.sh @@ -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" |