X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/05adaa9794e41d02870a74a1ed7ba58cc59b9286..ad3f1761248b47c1c931b3c02fd2346258d6ba82:/package/base-files/files/lib/config/uci.sh diff --git a/package/base-files/files/lib/config/uci.sh b/package/base-files/files/lib/config/uci.sh index 957c1bb7c..12795d813 100755 --- a/package/base-files/files/lib/config/uci.sh +++ b/package/base-files/files/lib/config/uci.sh @@ -23,7 +23,7 @@ uci_load() { config_load "$PACKAGE" local PACKAGE_BASE="$(basename "$PACKAGE")" [ -f "/tmp/.uci/${PACKAGE_BASE}" ] && { - . "/tmp/.uci/${PACKAGE_BASE}" + . "/tmp/.uci/${PACKAGE_BASE}" 2>/dev/null >/dev/null config_cb } } @@ -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"