From 4cb7df23e9512794a7bca7872f8aa23901de7b84 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 30 Jul 2008 19:21:09 +0000 Subject: allow packages to optionally append config file contents in the environment by setting a flag and calling config_load multiple times SVN-Revision: 12020 --- package/uci/files/uci/lib/config/uci.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'package/uci') 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="$?" -- cgit v1.1