summaryrefslogtreecommitdiff
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
commit4cb7df23e9512794a7bca7872f8aa23901de7b84 (patch)
tree516e010414b04bf42904d09d61f9566263bf4b9f /package/uci
parentc5ecc1790a8c41671118745c1fe35dcd31e78a23 (diff)
downloadmtk-20170518-4cb7df23e9512794a7bca7872f8aa23901de7b84.zip
mtk-20170518-4cb7df23e9512794a7bca7872f8aa23901de7b84.tar.gz
mtk-20170518-4cb7df23e9512794a7bca7872f8aa23901de7b84.tar.bz2
allow packages to optionally append config file contents in the environment by setting a flag and calling config_load multiple times
SVN-Revision: 12020
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 cd8f6b1..c226f4f 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="$?"