[source] uci: add missing 'option' support to uci_rename()
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 2 08:22:25 PST 2018
jow pushed a commit to source.git, branch master:
https://git.lede-project.org/a367645f23d2ed93ea29c7237fa1b2d6c3ded7e4
commit a367645f23d2ed93ea29c7237fa1b2d6c3ded7e4
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Tue Apr 25 02:16:56 2017 -0700
uci: add missing 'option' support to uci_rename()
When using the uci.sh wrapper, allow parameters to match those supported
by the uci binary i.e. "uci rename <config>.<section>[.<option>]=<name>".
Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
package/system/uci/files/lib/config/uci.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/system/uci/files/lib/config/uci.sh b/package/system/uci/files/lib/config/uci.sh
index 50891a6..78ec277 100644
--- a/package/system/uci/files/lib/config/uci.sh
+++ b/package/system/uci/files/lib/config/uci.sh
@@ -118,9 +118,10 @@ uci_add() {
uci_rename() {
local PACKAGE="$1"
local CONFIG="$2"
- local VALUE="$3"
+ local OPTION="$3"
+ local VALUE="$4"
- /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} rename "$PACKAGE.$CONFIG=$VALUE"
+ /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} rename "$PACKAGE.$CONFIG${VALUE:+.$OPTION}=${VALUE:-$OPTION}"
}
uci_remove() {
More information about the lede-commits
mailing list