projects
/
openwrt
/
svn-archive
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b882b5
)
sync awk implementation of config_get_bool with the shell variant
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 19 Sep 2007 15:36:30 +0000
(15:36 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 19 Sep 2007 15:36:30 +0000
(15:36 +0000)
SVN-Revision: 8841
package/base-files/files/lib/config/uci.awk
patch
|
blob
|
history
diff --git
a/package/base-files/files/lib/config/uci.awk
b/package/base-files/files/lib/config/uci.awk
index e3f946731691421df0942f06a75aa1f7725eaffe..5972ad23a06647e91507049d1ed507103c347937 100644
(file)
--- 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)
}