ramips: add feature to blink led on sysupgrade
authorJohn Crispin <john@openwrt.org>
Tue, 3 Nov 2015 13:32:02 +0000 (13:32 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 3 Nov 2015 13:32:02 +0000 (13:32 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 47373

target/linux/ramips/base-files/etc/diag.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh

index e0dd92ab97ca0ca385ded138670aa551092635b9..3013d245d62a80d773028c504e0754bc5c0c9709 100644 (file)
@@ -110,6 +110,10 @@ get_status_led() {
        mlwg2)
                status_led="$board:blue:system"
                ;;
+       linkits7688| \
+       linkits7688d)
+               [ "$1" = "upgrade" ] && status_led="mediatek:orange:wifi"
+               ;;
        m2m)
                status_led="$board:blue:wifi"
                ;;
@@ -179,7 +183,7 @@ get_status_led() {
 }
 
 set_state() {
-       get_status_led
+       get_status_led $1
 
        case "$1" in
        preinit)
@@ -188,6 +192,7 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       upgrade | \
        preinit_regular)
                status_led_blink_preinit_regular
                ;;
index 3d4b73afb626ac0f31424b24a274b67c158e33ae..0e8d619069b7e5d037f400ec6948819f4ecc6178 100755 (executable)
@@ -203,4 +203,9 @@ disable_watchdog() {
        }
 }
 
+blink_led() {
+       . /etc/diag.sh; set_state upgrade
+}
+
 append sysupgrade_pre_upgrade disable_watchdog
+append sysupgrade_pre_upgrade blink_led