mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-14 02:44:45 +00:00
make uci_add() create anonymous sections if requested and store the new section name in a variable
SVN-Revision: 10432
This commit is contained in:
parent
dd90a2cadd
commit
e1bb6ae6be
@ -68,7 +68,12 @@ uci_add() {
|
||||
local TYPE="$2"
|
||||
local CONFIG="$3"
|
||||
|
||||
/sbin/uci set "$PACKAGE.$CONFIG=$TYPE"
|
||||
if [ -z "$CONFIG" ]; then
|
||||
export ${NO_EXPORT:+-n} CONFIG_SECTION="$(/sbin/uci add "$PACKAGE" "$TYPE")"
|
||||
else
|
||||
/sbin/uci set "$PACKAGE.$CONFIG=$TYPE"
|
||||
export ${NO_EXPORT:+-n} CONFIG_SECTION="$CONFIG"
|
||||
fi
|
||||
}
|
||||
|
||||
uci_rename() {
|
||||
|
Loading…
Reference in New Issue
Block a user