aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-01-08 20:26:52 +0000
committerJohn Crispin <blogic@openwrt.org>2015-01-08 20:26:52 +0000
commit0db74510c05e7f1c3c4518f9ba1de7f13d8be86c (patch)
tree10914186a21aac9636fac2445a6b3c3981098961 /package/base-files/files/lib
parentec797db3971c466704e9ba0907aff76207b78625 (diff)
downloadmaster-187ad058-0db74510c05e7f1c3c4518f9ba1de7f13d8be86c.tar.gz
master-187ad058-0db74510c05e7f1c3c4518f9ba1de7f13d8be86c.tar.bz2
master-187ad058-0db74510c05e7f1c3c4518f9ba1de7f13d8be86c.zip
base-files: Fix switch settings for uci-defaults-new.sh.
The enable and reset settings need to be added even when they're false. This is true at least for 'enable', that seems to default to true otherwise. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43887 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults-new.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults-new.sh b/package/base-files/files/lib/functions/uci-defaults-new.sh
index 0751744dcb..7222ff839c 100755
--- a/package/base-files/files/lib/functions/uci-defaults-new.sh
+++ b/package/base-files/files/lib/functions/uci-defaults-new.sh
@@ -70,8 +70,8 @@ ucidef_add_switch() {
json_select_object switch
json_select_object $name
- [ "$enable" -eq 1 ] && json_add_boolean enable 1
- [ "$reset" -eq 1 ] && json_add_boolean reset 1
+ json_add_boolean enable $enable
+ json_add_boolean reset $reset
json_select ..
json_select ..