From: nbd Date: Wed, 30 Jul 2008 19:21:09 +0000 (+0000) Subject: allow packages to optionally append config file contents in the environment by settin... X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=a88219f1f2880028c9aeaa078c334ed0c330a1af 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 --- diff --git a/package/uci/files/uci/lib/config/uci.sh b/package/uci/files/uci/lib/config/uci.sh index cd8f6b160..c226f4fe1 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="$?"