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)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Sun, 15 Jul 2018 18:08:44 +0000 (20:08 +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>
(cherry picked from commit 4fc005197a320ff728544eba8028f7a9f23e1868)

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"