summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-09-19 15:36:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-09-19 15:36:30 +0000
commitce63393e3663a28c8a875c16793f177c62e8d2b7 (patch)
treeab6bf70f1d2ab21c038187a1faf7688a8b5ea303 /package/base-files
parent6b882b579f215c46fbcb066d0147b02f56fc8b4b (diff)
downloadmtk-20170518-ce63393e3663a28c8a875c16793f177c62e8d2b7.zip
mtk-20170518-ce63393e3663a28c8a875c16793f177c62e8d2b7.tar.gz
mtk-20170518-ce63393e3663a28c8a875c16793f177c62e8d2b7.tar.bz2
sync awk implementation of config_get_bool with the shell variant
SVN-Revision: 8841
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/config/uci.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/config/uci.awk b/package/base-files/files/lib/config/uci.awk
index e3f9467..5972ad2 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)
}