mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
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
This commit is contained in:
parent
827329791a
commit
1089950b53
@ -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
|
||||
;;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user