[LEDE-DEV] [PATCH] lantiq: diag - switch off the power led on failsafe

Mathias Kresin dev at kresin.me
Sun Jun 19 07:33:44 PDT 2016


This patch is a follow up to commit 4cf3fd4 "add support for indicating
the boot state using three leds".

At the time of writing the patch, I wasn't aware that it's possible to
switch info failsafe after boot (factory reset).

Enabling the failsafe led without disabling the running led causes an
unexpected led colour on devices using a single multicolour led to
indicate the boot state.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/lantiq/base-files/etc/diag.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh
index 71d6f3e..f6363b3 100644
--- a/target/linux/lantiq/base-files/etc/diag.sh
+++ b/target/linux/lantiq/base-files/etc/diag.sh
@@ -17,6 +17,10 @@ set_state() {
 		;;
 	failsafe)
 		status_led_off
+		[ -n "$running" ] && {
+			status_led="$running"
+			status_led_off
+		}
 		status_led="$failsafe"
 		status_led_blink_failsafe
 		;;
-- 
1.9.1




More information about the Lede-dev mailing list