Author: luka
Date: 2014-06-30 01:05:05 +0200 (Mon, 30 Jun 2014)
New Revision: 41405

Modified:
   trunk/package/base-files/files/lib/functions.sh
Log:
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 <[email protected]>

Modified: trunk/package/base-files/files/lib/functions.sh
===================================================================
--- trunk/package/base-files/files/lib/functions.sh     2014-06-29 22:26:08 UTC 
(rev 41404)
+++ trunk/package/base-files/files/lib/functions.sh     2014-06-29 23:05:05 UTC 
(rev 41405)
@@ -102,8 +102,8 @@
        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"
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to