summaryrefslogtreecommitdiff
path: root/package/base-files/files
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2014-06-29 23:05:05 +0000
committerLuka Perkov <luka@openwrt.org>2014-06-29 23:05:05 +0000
commitbe2a05778792e34afffff28a28091acfb2984b63 (patch)
treeda5c61463d4fdfbdaf62f626785db2f2dc7cf89f /package/base-files/files
parent1c499abcdaeb30bb27c68cf2032fe4f986f52dda (diff)
downloadmtk-20170518-be2a05778792e34afffff28a28091acfb2984b63.zip
mtk-20170518-be2a05778792e34afffff28a28091acfb2984b63.tar.gz
mtk-20170518-be2a05778792e34afffff28a28091acfb2984b63.tar.bz2
base-files: define yes/no as valid boolean options
ubox validate_data defines yes/no as valid boolean options, do the same in config_get_bool too. Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 41405
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index e55cad0..0d4b2a3 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -102,8 +102,8 @@ config_get_bool() {
local _tmp
config_get _tmp "$2" "$3" "$4"
case "$_tmp" in
- 1|on|true|enabled) _tmp=1;;
- 0|off|false|disabled) _tmp=0;;
+ 1|on|true|yes|enabled) _tmp=1;;
+ 0|off|false|no|disabled) _tmp=0;;
*) _tmp="$4";;
esac
export ${NO_EXPORT:+-n} "$1=$_tmp"