aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-01-08 20:26:52 +0000
committerJohn Crispin <john@openwrt.org>2015-01-08 20:26:52 +0000
commit31eadd07f29842a26ff9f133157aa28a0f379f46 (patch)
tree8566ce79176c97ee6ab7df83e46a1eafba51bbb1 /package
parent52c949e448ef29c8b12f037b8e379c4aeab32fd8 (diff)
downloadupstream-31eadd07f29842a26ff9f133157aa28a0f379f46.tar.gz
upstream-31eadd07f29842a26ff9f133157aa28a0f379f46.tar.bz2
upstream-31eadd07f29842a26ff9f133157aa28a0f379f46.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> SVN-Revision: 43887
Diffstat (limited to 'package')
-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 ..