aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/base-files/etc/diag.sh
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/base-files/etc/diag.sh')
-rw-r--r--target/linux/ath79/base-files/etc/diag.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/ath79/base-files/etc/diag.sh b/target/linux/ath79/base-files/etc/diag.sh
index 8022151378..b18463413a 100644
--- a/target/linux/ath79/base-files/etc/diag.sh
+++ b/target/linux/ath79/base-files/etc/diag.sh
@@ -2,6 +2,8 @@
. /lib/functions/leds.sh
+status_led="$(get_dt_led status)"
+
get_status_led() {
local board=$(board_name)
local boardname="${board##*,}"
@@ -23,7 +25,7 @@ get_status_led() {
}
set_state() {
- get_status_led
+ [ -z "$status_led" ] && get_status_led
case "$1" in
preinit)