[OpenWrt-Devel] [PATCH 2/3] base-files:fix a bug when add led timer trigger

robinson wu wurobinson at qq.com
Mon Jun 3 23:13:39 EDT 2019


When I tried to add a led timer tirgger in "target/linux/ramips/base-files/
etc/board.d/01_leds" like below
ucidef_set_led_timer "system" "system" "zhuotk:green:system" "1000" "1000"
it will be failed to add value to "delayon" and "delayoff". This commit fix this
bug.

Signed-off-by: robinson wu <wurobinson at qq.com>
---
 package/base-files/files/lib/functions/uci-defaults.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 315df7b..23bde9a 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -463,6 +463,7 @@ _ucidef_set_led_timer() {
 
 	_ucidef_set_led_common "$1" "$2" "$3"
 
+	json_add_string type timer
 	json_add_string trigger "$trigger_name"
 	json_add_int delayon "$delayon"
 	json_add_int delayoff "$delayoff"
-- 
2.7.4




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list