diff options
author | Tony Ambardar <itugrok@yahoo.com> | 2017-04-25 02:16:56 -0700 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-01-02 17:22:19 +0100 |
commit | a367645f23d2ed93ea29c7237fa1b2d6c3ded7e4 (patch) | |
tree | 3679638b33f15e6e52ce706a574545dde7decebb | |
parent | cbe71649bc49ccc6ae96385482d0794c33336f68 (diff) | |
download | upstream-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>
-rw-r--r-- | package/system/uci/files/lib/config/uci.sh | 5 |
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() { |