mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-29 04:51:44 +02:00
make uci_add() create anonymous sections if requested and store the new section name in a variable
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10432 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f14b137da6
commit
9aab3598bc
@ -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