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
owl
Luka Perkov 2014-06-29 23:05:05 +00:00
parent 1c499abcda
commit be2a057787
1 changed files with 2 additions and 2 deletions

View File

@ -102,8 +102,8 @@ config_get_bool() {
local _tmp local _tmp
config_get _tmp "$2" "$3" "$4" config_get _tmp "$2" "$3" "$4"
case "$_tmp" in case "$_tmp" in
1|on|true|enabled) _tmp=1;; 1|on|true|yes|enabled) _tmp=1;;
0|off|false|disabled) _tmp=0;; 0|off|false|no|disabled) _tmp=0;;
*) _tmp="$4";; *) _tmp="$4";;
esac esac
export ${NO_EXPORT:+-n} "$1=$_tmp" export ${NO_EXPORT:+-n} "$1=$_tmp"