1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-01-27 01:11:09 +02:00

sync awk implementation of config_get_bool with the shell variant

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8841 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-09-19 15:36:30 +00:00
parent 4dcc9d335a
commit 9c407b3b07

View File

@ -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)
}