From: Felix Fietkau Date: Wed, 19 Sep 2007 15:36:30 +0000 (+0000) Subject: sync awk implementation of config_get_bool with the shell variant X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ce63393e3663a28c8a875c16793f177c62e8d2b7;p=openwrt%2Fstaging%2Fjow.git sync awk implementation of config_get_bool with the shell variant SVN-Revision: 8841 --- diff --git a/package/base-files/files/lib/config/uci.awk b/package/base-files/files/lib/config/uci.awk index e3f9467316..5972ad23a0 100644 --- a/package/base-files/files/lib/config/uci.awk +++ b/package/base-files/files/lib/config/uci.awk @@ -38,8 +38,8 @@ function config_get(package, option) { # parameters: 3 function config_get_bool(package, option, default, var) { var = config_get(package, option); - if ((var == "enabled") || (var == "1") || (var == "on")) return 1 - if ((var == "disabled") || (var == "0") || (var == "off")) return 1 + if ((var == "enabled") || (var == "true") || (var == "1") || (var == "on")) return 1 + if ((var == "disabled") || (var == "false") || (var == "0") || (var == "off")) return 1 return (var && var != "0" ? 1 : 0) }