mirror of https://github.com/hak5/openwrt-owl.git
ramips: add feature to blink led on sysupgrade
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 47373owl
parent
b0d9e64464
commit
2350c149b5
|
@ -110,6 +110,10 @@ get_status_led() {
|
||||||
mlwg2)
|
mlwg2)
|
||||||
status_led="$board:blue:system"
|
status_led="$board:blue:system"
|
||||||
;;
|
;;
|
||||||
|
linkits7688| \
|
||||||
|
linkits7688d)
|
||||||
|
[ "$1" = "upgrade" ] && status_led="mediatek:orange:wifi"
|
||||||
|
;;
|
||||||
m2m)
|
m2m)
|
||||||
status_led="$board:blue:wifi"
|
status_led="$board:blue:wifi"
|
||||||
;;
|
;;
|
||||||
|
@ -179,7 +183,7 @@ get_status_led() {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_state() {
|
set_state() {
|
||||||
get_status_led
|
get_status_led $1
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
preinit)
|
preinit)
|
||||||
|
@ -188,6 +192,7 @@ set_state() {
|
||||||
failsafe)
|
failsafe)
|
||||||
status_led_blink_failsafe
|
status_led_blink_failsafe
|
||||||
;;
|
;;
|
||||||
|
upgrade | \
|
||||||
preinit_regular)
|
preinit_regular)
|
||||||
status_led_blink_preinit_regular
|
status_led_blink_preinit_regular
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -203,4 +203,9 @@ disable_watchdog() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blink_led() {
|
||||||
|
. /etc/diag.sh; set_state upgrade
|
||||||
|
}
|
||||||
|
|
||||||
append sysupgrade_pre_upgrade disable_watchdog
|
append sysupgrade_pre_upgrade disable_watchdog
|
||||||
|
append sysupgrade_pre_upgrade blink_led
|
||||||
|
|
Loading…
Reference in New Issue