From 92ac2a20ebba9f8695b464041cc8aeb30bb85576 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 8 Apr 2021 09:28:02 +0200 Subject: [PATCH] uci: add uci_revert function Add missing uci_revert shell function wrapper. Signed-off-by: Florian Eckert --- 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 -- 2.30.2