projects
/
openwrt
/
staging
/
kaloz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4cd598
)
support true and false in config_get_bool
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 19 Sep 2007 14:43:29 +0000
(14:43 +0000)
committer
Felix 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
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/functions.sh
b/package/base-files/files/etc/functions.sh
index a613e1190b0423818747a6dd8f0f7b8db53b7cd3..284ed4c14fa79c8228ce69ef514d4b4e93beb10a 100755
(executable)
--- a/
package/base-files/files/etc/functions.sh
+++ b/
package/base-files/files/etc/functions.sh
@@
-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
}