support true and false in config_get_bool
authorFelix Fietkau <nbd@openwrt.org>
Wed, 19 Sep 2007 14:43:29 +0000 (14:43 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 19 Sep 2007 14:43:29 +0000 (14:43 +0000)
SVN-Revision: 8840

package/base-files/files/etc/functions.sh

index a613e1190b0423818747a6dd8f0f7b8db53b7cd3..284ed4c14fa79c8228ce69ef514d4b4e93beb10a 100755 (executable)
@@ -127,8 +127,8 @@ config_get_bool() {
        local _tmp
        config_get "_tmp" "$2" "$3"
        case "$_tmp" in
-               1|on|enabled) export ${NO_EXPORT:+-n} "$1=1";;
-               0|off|disabled) export ${NO_EXPORT:+-n} "$1=0";;
+               1|on|true|enabled) export ${NO_EXPORT:+-n} "$1=1";;
+               0|off|false|disabled) export ${NO_EXPORT:+-n} "$1=0";;
                *) eval "$1=${4:-0}";;
        esac
 }