ipq40xx: add get_status_led to diag.sh
authorDavid Bauer <mail@david-bauer.net>
Tue, 12 Jun 2018 23:37:55 +0000 (01:37 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 18 Jun 2018 05:10:19 +0000 (07:10 +0200)
This commit adds the get_status_led method to diag.sh, which sets the
boot-led as status-led for scripts using this method to get a
status-led.

This method is used platform-independent in downstream project gluon to
set the LED used to indicate the config-mode.

Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/ipq40xx/base-files/etc/diag.sh

index 4cfe6325f22832800e7a8594d71ba70fd8e61da2..a3a70477024ff4e51e110b7d0566019ad71e1899 100755 (executable)
@@ -7,6 +7,10 @@ failsafe="$(get_dt_led failsafe)"
 running="$(get_dt_led running)"
 upgrade="$(get_dt_led upgrade)"
 
+get_status_led() {
+       status_led="$boot"
+}
+
 set_state() {
        status_led="$boot"