Changeset 10432


Ignore:
Timestamp:
2008-02-09T18:27:43+01:00 (9 years ago)
Author:
nbd
Message:

make uci_add() create anonymous sections if requested and store the new section name in a variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/uci/files/uci/lib/config/uci.sh

    r10399 r10432  
    6969        local CONFIG="$3" 
    7070 
    71         /sbin/uci set "$PACKAGE.$CONFIG=$TYPE" 
     71        if [ -z "$CONFIG" ]; then 
     72                export ${NO_EXPORT:+-n} CONFIG_SECTION="$(/sbin/uci add "$PACKAGE" "$TYPE")" 
     73        else 
     74                /sbin/uci set "$PACKAGE.$CONFIG=$TYPE" 
     75                export ${NO_EXPORT:+-n} CONFIG_SECTION="$CONFIG" 
     76        fi 
    7277} 
    7378 
Note: See TracChangeset for help on using the changeset viewer.