aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/uci
diff options
context:
space:
mode:
authorTony Ambardar <itugrok@yahoo.com>2017-04-25 02:16:56 -0700
committerJo-Philipp Wich <jo@mein.io>2018-01-02 17:22:19 +0100
commita367645f23d2ed93ea29c7237fa1b2d6c3ded7e4 (patch)
tree3679638b33f15e6e52ce706a574545dde7decebb /package/system/uci
parentcbe71649bc49ccc6ae96385482d0794c33336f68 (diff)
downloadupstream-a367645f23d2ed93ea29c7237fa1b2d6c3ded7e4.tar.gz
upstream-a367645f23d2ed93ea29c7237fa1b2d6c3ded7e4.tar.bz2
upstream-a367645f23d2ed93ea29c7237fa1b2d6c3ded7e4.zip
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@yahoo.com>
Diffstat (limited to 'package/system/uci')
-rw-r--r--package/system/uci/files/lib/config/uci.sh5
1 files 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 50891a64e4..78ec277669 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() {