diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-04-08 09:28:02 +0200 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-06-21 08:36:03 -1000 |
commit | 92ac2a20ebba9f8695b464041cc8aeb30bb85576 (patch) | |
tree | 81c70a3bedbbb0fc41443f19617df415af14eb9c /package | |
parent | f0f1d68d528402b4d51a1dd08d2e2c9034167f92 (diff) | |
download | upstream-92ac2a20ebba9f8695b464041cc8aeb30bb85576.tar.gz upstream-92ac2a20ebba9f8695b464041cc8aeb30bb85576.tar.bz2 upstream-92ac2a20ebba9f8695b464041cc8aeb30bb85576.zip |
uci: add uci_revert function
Add missing uci_revert shell function wrapper.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'package')
-rw-r--r-- | package/system/uci/Makefile | 2 | ||||
-rw-r--r-- | package/system/uci/files/lib/config/uci.sh | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 2036f92a7e..1355955d1a 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uci -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git diff --git a/package/system/uci/files/lib/config/uci.sh b/package/system/uci/files/lib/config/uci.sh index 8d32cd1743..6ebfb73ae4 100644 --- a/package/system/uci/files/lib/config/uci.sh +++ b/package/system/uci/files/lib/config/uci.sh @@ -149,6 +149,14 @@ uci_remove_list() { /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del_list "$PACKAGE.$CONFIG.$OPTION=$VALUE" } +uci_revert() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} revert "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" +} + uci_commit() { local PACKAGE="$1" /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit $PACKAGE |