config_load "$PACKAGE"
local PACKAGE_BASE="$(basename "$PACKAGE")"
[ -f "/tmp/.uci/${PACKAGE_BASE}" ] && {
- . "/tmp/.uci/${PACKAGE_BASE}" 2>&/dev/null >&/dev/null
+ . "/tmp/.uci/${PACKAGE_BASE}" 2>/dev/null >/dev/null
config_cb
}
}
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"