[OpenWrt-Devel] [PATCH] base-files: Fix switch settings for uci-defaults-new.sh.
Vittorio G (VittGam)
openwrt at vittgam.net
Wed Dec 24 20:29:19 EST 2014
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 at vittgam.net>
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 0751744..7222ff8 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 ..
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list