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: v18.06.3~7 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=commitdiff_plain;h=9656f49ea009a2337e4ac580d7aed326e3183c0e base-files: fix uci led oneshot/timer trigger This patch adds a missing type property which prevented the creation of oneshot and timer led triggers when they are specified in the /etc/board.d/01_leds files. i.e.: ucidef_set_led_timer "system" "system" "zhuotk:green:system" "1000" "1000" Fixes: b06a286a4861 ("base-files: cleanup led functions in uci-defaults.sh") Signed-off-by: Robinson Wu Signed-off-by: Christian Lamparter [also fix oneshot as well] --- diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 3126fe6510..5ca14df1ad 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -481,6 +481,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"