[openwrt/openwrt] uci: add uci_revert function
LEDE Commits
lede-commits at lists.infradead.org
Mon Jun 21 11:36:24 PDT 2021
aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/92ac2a20ebba9f8695b464041cc8aeb30bb85576
commit 92ac2a20ebba9f8695b464041cc8aeb30bb85576
Author: Florian Eckert <fe at dev.tdt.de>
AuthorDate: Thu Apr 8 09:28:02 2021 +0200
uci: add uci_revert function
Add missing uci_revert shell function wrapper.
Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
package/system/uci/Makefile | 2 +-
package/system/uci/files/lib/config/uci.sh | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
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
More information about the lede-commits
mailing list