From: Robinson Wu Date: Tue, 4 Jun 2019 03:13:39 +0000 (+0800) Subject: base-files: fix uci led oneshot/timer trigger X-Git-Tag: v21.02.0-rc1~5761 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=869ff80d312d5ef64f84eb22a0906f80e614f706;p=openwrt%2Fstaging%2Fhauke.git base-files: fix uci led oneshot/timer trigger This patch adds a missing type property. This fixes the creation of oneshot and timer led triggers like: | ucidef_set_led_timer "system" "system" "zhuotk:green:system" "1000" "1000" from /etc/init.d/01_leds. Fixes: b06a286a4861 ("base-files: cleanup led functions in uci-defaults.sh") Signed-off-by: Robinson Wu Signed-off-by: Christian Lamparter --- diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 1d57de5a70..2fb7555969 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -476,6 +476,7 @@ _ucidef_set_led_timer() { _ucidef_set_led_common "$1" "$2" "$3" + json_add_string type "$trigger_name" json_add_string trigger "$trigger_name" json_add_int delayon "$delayon" json_add_int delayoff "$delayoff"