aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/base-files/Makefile2
-rwxr-xr-xpackage/base-files/files/lib/functions.sh17
2 files changed, 13 insertions, 6 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 35a07f2aad..da3976424f 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
-PKG_RELEASE:=243
+PKG_RELEASE:=244
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 ee4ad1af83..272e230db2 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -118,15 +118,22 @@ config_get() {
esac
}
-# config_get_bool <variable> <section> <option> [<default>]
-config_get_bool() {
- local _tmp
- config_get _tmp "$2" "$3" "$4"
+# get_bool <value> [<default>]
+get_bool() {
+ local _tmp="$1"
case "$_tmp" in
1|on|true|yes|enabled) _tmp=1;;
0|off|false|no|disabled) _tmp=0;;
- *) _tmp="$4";;
+ *) _tmp="$2";;
esac
+ echo -n "$_tmp"
+}
+
+# config_get_bool <variable> <section> <option> [<default>]
+config_get_bool() {
+ local _tmp
+ config_get _tmp "$2" "$3" "$4"
+ _tmp="$(get_bool "$_tmp" "$4")"
export ${NO_EXPORT:+-n} "$1=$_tmp"
}