From dc8d5d3ca9904f6a180f869b3bc38a97a597e6a3 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 17 Sep 2019 21:51:48 +0200 Subject: [PATCH] gluon-setup-mode: get status-led from device-tree With this commit, the status-led is set to be the "led-running" device-tree alias for targets which do not implement the get_status_led method in /etc/diag.sh. --- .../files/lib/gluon/setup-mode/rc.d/S96led | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led b/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led index b01ae599..7242451c 100755 --- a/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led +++ b/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led @@ -6,6 +6,12 @@ start() { /etc/init.d/led start . /etc/diag.sh - get_status_led + + get_status_led 2> /dev/null + + if [ -z $status_led ]; then + status_led="$running" + fi + status_led_set_timer 1000 300 }