diff options
author | John Crispin <blogic@openwrt.org> | 2015-11-03 13:32:55 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-11-03 13:32:55 +0000 |
commit | 1089950b534fe03e791cb5d5246ef1ecd45d7156 (patch) | |
tree | f69c1b458603b73be70b7e51c562b31da77f2ce6 /target | |
parent | 827329791a159ec484f9d8ad38e52e0bbac5d28c (diff) | |
download | upstream-1089950b534fe03e791cb5d5246ef1ecd45d7156.tar.gz upstream-1089950b534fe03e791cb5d5246ef1ecd45d7156.tar.bz2 upstream-1089950b534fe03e791cb5d5246ef1ecd45d7156.zip |
ramips: add feature to blink led on sysupgrade
Signed-off-by: John Crispin <blogic@openwrt.org>
Backport of r47373
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47374 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ramips/base-files/etc/diag.sh | 7 | ||||
-rwxr-xr-x | target/linux/ramips/base-files/lib/upgrade/platform.sh | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 5fc5137ce2..d32d69288b 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -85,6 +85,10 @@ get_status_led() { hw550-3g) status_led="hw550-3g:green:status" ;; + linkits7688| \ + linkits7688d) + [ "$1" = "upgrade" ] && status_led="mediatek:orange:wifi" + ;; m2m) status_led="m2m:blue:wifi" ;; @@ -250,7 +254,7 @@ get_status_led() { } set_state() { - get_status_led + get_status_led $1 case "$1" in preinit) @@ -259,6 +263,7 @@ set_state() { failsafe) status_led_blink_failsafe ;; + upgrade | \ preinit_regular) status_led_blink_preinit_regular ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 23f4575dc6..11fee85ea1 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -196,4 +196,9 @@ disable_watchdog() { } } +blink_led() { + . /etc/diag.sh; set_state upgrade +} + append sysupgrade_pre_upgrade disable_watchdog +append sysupgrade_pre_upgrade blink_led |