aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/base-files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2018-08-15 19:12:27 +0200
committerMathias Kresin <dev@kresin.me>2018-08-16 21:20:57 +0200
commitdd448cd2767c42d0ccde960da61585a2537eaf5a (patch)
treecb31db202d67a032fe54a0f174e53fbd523e9434 /target/linux/apm821xx/base-files
parent56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec (diff)
downloadupstream-dd448cd2767c42d0ccde960da61585a2537eaf5a.tar.gz
upstream-dd448cd2767c42d0ccde960da61585a2537eaf5a.tar.bz2
upstream-dd448cd2767c42d0ccde960da61585a2537eaf5a.zip
treewide: fix upgrade led handling
The upgrade led is only used if a running led is defined. If no running led is defined, the upgrade led is ignored and upgrade isn't indicated at all. Instead, turn off the running led prior to turning the upgrade led on. In most cases there isn't any visual change, but it allows to use an independent led for upgrade indication. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/apm821xx/base-files')
-rwxr-xr-xtarget/linux/apm821xx/base-files/etc/diag.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/apm821xx/base-files/etc/diag.sh b/target/linux/apm821xx/base-files/etc/diag.sh
index 26c035c6f3..96d42a4892 100755
--- a/target/linux/apm821xx/base-files/etc/diag.sh
+++ b/target/linux/apm821xx/base-files/etc/diag.sh
@@ -29,9 +29,11 @@ set_state() {
;;
upgrade)
[ -n "$running" ] && {
- status_led="$upgrade"
- status_led_blink_preinit_regular
+ status_led="$running"
+ status_led_off
}
+ status_led="$upgrade"
+ status_led_blink_preinit_regular
;;
done)
status_led_off