add "preinit_regular" diag.sh set_state argument

This new argument is used right after starting regular preinit (which
happens if failsafe wasn't triggered). The main purpose of "preinit"
argument is to indicate that failsafe can be triggered, however we were
missing a way to inform user that we don't wait for a trigger anymore.
With this change it's clear when failsafe mode can be triggered.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43715
master
John Crispin 10 years ago
parent a5b6b7e419
commit 019ea725aa
  1. 4
      package/base-files/files/lib/functions/leds.sh
  2. 6
      package/base-files/files/lib/preinit/10_indicate_preinit
  3. 2
      package/base-files/files/lib/preinit/50_indicate_regular_preinit
  4. 3
      target/linux/adm5120/base-files/etc/diag.sh
  5. 3
      target/linux/ar7/base-files/etc/diag.sh
  6. 3
      target/linux/ar71xx/base-files/etc/diag.sh
  7. 4
      target/linux/avr32/base-files/etc/diag.sh
  8. 3
      target/linux/bcm53xx/base-files/etc/diag.sh
  9. 3
      target/linux/brcm47xx/base-files/etc/diag.sh
  10. 3
      target/linux/brcm63xx/base-files/etc/diag.sh
  11. 3
      target/linux/cns21xx/base-files/etc/diag.sh
  12. 3
      target/linux/kirkwood/base-files/etc/diag.sh
  13. 4
      target/linux/mpc85xx/base-files/etc/diag.sh
  14. 3
      target/linux/mvebu/base-files/etc/diag.sh
  15. 3
      target/linux/mxs/base-files/etc/diag.sh
  16. 3
      target/linux/oxnas/base-files/etc/diag.sh
  17. 3
      target/linux/ramips/base-files/etc/diag.sh

@ -66,3 +66,7 @@ status_led_blink_preinit() {
status_led_blink_failsafe() {
led_timer $status_led 50 50
}
status_led_blink_preinit_regular() {
led_timer $status_led 500 500
}

@ -36,13 +36,9 @@ preinit_echo() {
echo $1
}
pi_indicate_led() {
set_state preinit
}
pi_indicate_preinit() {
preinit_net_echo "Doing OpenWrt Preinit\n"
pi_indicate_led
set_state preinit
}
boot_hook_add preinit_main preinit_ip

@ -4,7 +4,7 @@
indicate_regular_preinit() {
preinit_net_echo "Continuing with Regular Preinit\n"
pi_indicate_led
set_state preinit_regular
}
boot_hook_add preinit_main indicate_regular_preinit

@ -12,6 +12,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -29,6 +29,9 @@ set_state() {
failsafe)
status_led_set_timer 50 50
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
[ "$status_led" = "status" ] && {
status_led_set_heartbeat

@ -305,6 +305,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
case $(ar71xx_board_name) in

@ -15,6 +15,10 @@ set_state() {
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -33,6 +33,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -31,6 +31,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -12,6 +12,9 @@ set_state() {
failsafe)
status_led_set_timer 50 50
;;
preinit_regular)
status_led_set_timer 500 500
;;
done)
if [ "${status_led/power}" != "$status_led" ]; then
status_led_on

@ -22,6 +22,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -22,6 +22,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -24,6 +24,10 @@ set_state() {
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -22,6 +22,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -28,6 +28,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -28,6 +28,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

@ -227,6 +227,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;

Loading…
Cancel
Save