Skip to content

Commit

Permalink
uci: add missing 'option' support to uci_rename()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
guidosarducci authored and jow- committed Jan 2, 2018
1 parent cbe7164 commit a367645
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package/system/uci/files/lib/config/uci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit a367645

Please sign in to comment.