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 4cfe632..a3a7047 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"