allow packages to optionally append config file contents in the environment by settin...
authorFelix Fietkau <nbd@openwrt.org>
Wed, 30 Jul 2008 19:21:09 +0000 (19:21 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 30 Jul 2008 19:21:09 +0000 (19:21 +0000)
SVN-Revision: 12020

package/uci/files/uci/lib/config/uci.sh

index cd8f6b160d90c69f3bf9f18427b0b1b2e13455b9..c226f4fe1a6ab089eb4bff06845e08e89d4b27bd 100644 (file)
@@ -23,9 +23,11 @@ uci_load() {
        local RET
 
        _C=0
-       export ${NO_EXPORT:+-n} CONFIG_SECTIONS=
-       export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=0
-       export ${NO_EXPORT:+-n} CONFIG_SECTION=
+       if [ -z "$CONFIG_APPEND" ]; then
+               export ${NO_EXPORT:+-n} CONFIG_SECTIONS=
+               export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=0
+               export ${NO_EXPORT:+-n} CONFIG_SECTION=
+       fi
 
        DATA="$(/sbin/uci ${LOAD_STATE:+-P /var/state} -S -n export "$PACKAGE" 2>/dev/null)"
        RET="$?"