aboutsummaryrefslogtreecommitdiffstats
path: root/package/uci
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-07-30 19:21:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-07-30 19:21:09 +0000
commit0536f2b1245f147fc3b9c7ee12c33a30383d970f (patch)
tree91e91ae34a32b3ae1da4f53c7479d53e481edfd6 /package/uci
parent13ab5b86e6b8eabf2e69edb3ece4545f77c61925 (diff)
downloadmaster-187ad058-0536f2b1245f147fc3b9c7ee12c33a30383d970f.tar.gz
master-187ad058-0536f2b1245f147fc3b9c7ee12c33a30383d970f.tar.bz2
master-187ad058-0536f2b1245f147fc3b9c7ee12c33a30383d970f.zip
allow packages to optionally append config file contents in the environment by setting a flag and calling config_load multiple times
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12020 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uci')
-rw-r--r--package/uci/files/uci/lib/config/uci.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/uci/files/uci/lib/config/uci.sh b/package/uci/files/uci/lib/config/uci.sh
index cd8f6b160d..c226f4fe1a 100644
--- a/package/uci/files/uci/lib/config/uci.sh
+++ b/package/uci/files/uci/lib/config/uci.sh
@@ -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="$?"