mirror of https://github.com/hak5/openwrt-owl.git
sync awk implementation of config_get_bool with the shell variant
SVN-Revision: 8841owl
parent
6b882b579f
commit
ce63393e36
|
@ -38,8 +38,8 @@ function config_get(package, option) {
|
||||||
# parameters: 3
|
# parameters: 3
|
||||||
function config_get_bool(package, option, default, var) {
|
function config_get_bool(package, option, default, var) {
|
||||||
var = config_get(package, option);
|
var = config_get(package, option);
|
||||||
if ((var == "enabled") || (var == "1") || (var == "on")) return 1
|
if ((var == "enabled") || (var == "true") || (var == "1") || (var == "on")) return 1
|
||||||
if ((var == "disabled") || (var == "0") || (var == "off")) return 1
|
if ((var == "disabled") || (var == "false") || (var == "0") || (var == "off")) return 1
|
||||||
return (var && var != "0" ? 1 : 0)
|
return (var && var != "0" ? 1 : 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue