[luci] 'yes' and 'no' for boolean settings in uci
Conor O'Gorman
i at conorogorman.net
Tue Apr 17 12:14:59 CEST 2012
Is there a reason that yes/no are currently not in the list of boolean
options?
Thanks,
Conor
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index b3e406c..f1d5397 100755
@@ -154,8 +154,8 @@ config_get_bool() {
local _tmp
config_get _tmp "$2" "$3" "$4"
case "$_tmp" in
- 1|on|true|enabled) _tmp=1;;
- 0|off|false|disabled) _tmp=0;;
+ 1|on|true|enabled|yes) _tmp=1;;
+ 0|off|false|disabled|no) _tmp=0;;
*) _tmp="$4";;
esac
export ${NO_EXPORT:+-n} "$1=$_tmp"
More information about the luci
mailing list