diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-06-21 21:26:13 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-06-21 21:32:47 +0200 |
commit | ba5c0a1dea0cbbde277f189dcfd520a9062bfaac (patch) | |
tree | b7e5f3875f097a7f54a1b95909b2b67ba5a7bf99 | |
parent | 5c6a8a9cdb6a0c961fbd78f2b98045eaa7386a74 (diff) | |
download | mtk-20170518-ba5c0a1dea0cbbde277f189dcfd520a9062bfaac.zip mtk-20170518-ba5c0a1dea0cbbde277f189dcfd520a9062bfaac.tar.gz mtk-20170518-ba5c0a1dea0cbbde277f189dcfd520a9062bfaac.tar.bz2 |
Revert "base-files: fix UCI config parsing and callback handling"
This reverts commit b6a1f43075f96b0028e33ed1af1fe31068791d24 as users
report Qos scripts are broken (FS1602)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rwxr-xr-x | package/base-files/files/lib/functions.sh | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 4fbc9a2..1d034fd 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk PKG_NAME:=base-files -PKG_RELEASE:=173.7 +PKG_RELEASE:=173.6 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 36ee491..c69feb3 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -57,16 +57,16 @@ config () { export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1)) name="${name:-cfg$CONFIG_NUM_SECTIONS}" append CONFIG_SECTIONS "$name" - export ${NO_EXPORT:+-n} CONFIG_SECTION="$name" - config_set "$CONFIG_SECTION" "TYPE" "${cfgtype}" [ -n "$NO_CALLBACK" ] || config_cb "$cfgtype" "$name" + export ${NO_EXPORT:+-n} CONFIG_SECTION="$name" + export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_TYPE=$cfgtype" } option () { local varname="$1"; shift local value="$*" - config_set "$CONFIG_SECTION" "${varname}" "${value}" + export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_${varname}=$value" [ -n "$NO_CALLBACK" ] || option_cb "$varname" "$*" } @@ -81,7 +81,7 @@ list() { config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value" config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len" append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP" - [ -n "$NO_CALLBACK" ] || list_cb "$varname" "$*" + list_cb "$varname" "$*" } config_unset() { @@ -113,8 +113,11 @@ config_set() { local section="$1" local option="$2" local value="$3" + local old_section="$CONFIG_SECTION" - export ${NO_EXPORT:+-n} "CONFIG_${section}_${option}=${value}" + CONFIG_SECTION="$section" + option "$option" "$value" + CONFIG_SECTION="$old_section" } config_foreach() { |