summaryrefslogtreecommitdiff
path: root/package/base-files/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-12-14 17:29:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-12-14 17:29:51 +0000
commit218b00653659cba2b3249494cfc11b6d3494ce76 (patch)
tree9635da3cd47f226f67162289a408283974a05ca9 /package/base-files/files
parentbfd12920bbaacd9bc9829fd5bc00d40cccc393a3 (diff)
downloadmtk-20170518-218b00653659cba2b3249494cfc11b6d3494ce76.zip
mtk-20170518-218b00653659cba2b3249494cfc11b6d3494ce76.tar.gz
mtk-20170518-218b00653659cba2b3249494cfc11b6d3494ce76.tar.bz2
fix CONFIG_FILENAME in uci_commit()
SVN-Revision: 5791
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/lib/config/uci.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/base-files/files/lib/config/uci.sh b/package/base-files/files/lib/config/uci.sh
index bd13222..12795d8 100755
--- a/package/base-files/files/lib/config/uci.sh
+++ b/package/base-files/files/lib/config/uci.sh
@@ -127,7 +127,8 @@ uci_commit() {
return 0
}
- config_load "$PACKAGE" || CONFIG_FILENAME="$ROOT/etc/config/$PACKAGE_BASE"
+ config_load "$PACKAGE"
+ CONFIG_FILENAME="${CONFIG_FILENAME:-$ROOT/etc/config/$PACKAGE_BASE}"
uci_do_update "$CONFIG_FILENAME" "$updatestr" > "/tmp/.uci/$PACKAGE_BASE.new" && {
mv -f "/tmp/.uci/$PACKAGE_BASE.new" "$CONFIG_FILENAME" && \
rm -f "/tmp/.uci/$PACKAGE_BASE"