aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/functions.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-06-15 15:12:57 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-06-15 15:12:57 +0000
commit796e53414f6791acee33bc54746e38f26b7eb1d2 (patch)
tree84f7700656db2f0c0a56d08eefb416c22ecc9d56 /package/base-files/files/etc/functions.sh
parent95549a64fd71c70a699415e04d92391c2ee5c3ae (diff)
downloadupstream-796e53414f6791acee33bc54746e38f26b7eb1d2.tar.gz
upstream-796e53414f6791acee33bc54746e38f26b7eb1d2.tar.bz2
upstream-796e53414f6791acee33bc54746e38f26b7eb1d2.zip
allow config_* and uci_* functions to work on files outside of /etc/config - these files are assumed to use commands generated by uci_* only (as overlay to regular config files)
SVN-Revision: 7636
Diffstat (limited to 'package/base-files/files/etc/functions.sh')
-rwxr-xr-xpackage/base-files/files/etc/functions.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh
index f757ffaf26..7ba59afbbe 100755
--- a/package/base-files/files/etc/functions.sh
+++ b/package/base-files/files/etc/functions.sh
@@ -85,7 +85,11 @@ config_clear() {
}
config_load() {
- local file="$UCI_ROOT/etc/config/$1"
+ local file
+ case "$1" in
+ /*) file="$1";;
+ *) file="$UCI_ROOT/etc/config/$1";;
+ esac
_C=0
export ${NO_EXPORT:+-n} CONFIG_SECTIONS=
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=0