add "preinit_regular" diag.sh set_state argument
authorJohn Crispin <john@openwrt.org>
Mon, 15 Dec 2014 10:37:00 +0000 (10:37 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 15 Dec 2014 10:37:00 +0000 (10:37 +0000)
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

17 files changed:
package/base-files/files/lib/functions/leds.sh
package/base-files/files/lib/preinit/10_indicate_preinit
package/base-files/files/lib/preinit/50_indicate_regular_preinit
target/linux/adm5120/base-files/etc/diag.sh
target/linux/ar7/base-files/etc/diag.sh
target/linux/ar71xx/base-files/etc/diag.sh
target/linux/avr32/base-files/etc/diag.sh
target/linux/bcm53xx/base-files/etc/diag.sh
target/linux/brcm47xx/base-files/etc/diag.sh
target/linux/brcm63xx/base-files/etc/diag.sh
target/linux/cns21xx/base-files/etc/diag.sh
target/linux/kirkwood/base-files/etc/diag.sh
target/linux/mpc85xx/base-files/etc/diag.sh
target/linux/mvebu/base-files/etc/diag.sh
target/linux/mxs/base-files/etc/diag.sh
target/linux/oxnas/base-files/etc/diag.sh
target/linux/ramips/base-files/etc/diag.sh

index 743c7da782cec1a4aca39ec4a0871cec22374388..4ac81455fac4b2e7c1552eb4fad384b41cea82f1 100644 (file)
@@ -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
+}
index 900911606a6388d3ba5d76c179fb1ab28b81ec9d..8e94df9ab2d478177fab4f668f6062d5599ecd36 100644 (file)
@@ -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
index bc223b358eaeea15e70a4792ba6f6bf9dbff3fb8..5b7523f6fd30a33e79cff051af41f3cc40dd39f6 100644 (file)
@@ -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
index f1317c5574d70a34bdb994a0ba94f239671200f5..08952bdaaafc49a697d23f95b6f1b5ad7cfae0ed 100755 (executable)
@@ -12,6 +12,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index 37eed6a1a15edc009ef60db9273fad7946e21a62..f6548e8d504b2718ea6f68eea52d25d8da507569 100644 (file)
@@ -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
index c022013f8f38a7cc2074e85dfc0e102d48716f6a..63e1ca6c8606dc7134546044e07c8015a267885b 100755 (executable)
@@ -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
index f7604ae7158d6298fcb67cfdb1c4e282eff6ddfb..38cd18968198d5858fd3afbc221094f5cf3c17c8 100755 (executable)
@@ -15,6 +15,10 @@ set_state() {
                status_led_blink_failsafe
                ;;
 
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
+
        done)
                status_led_on
                ;;
index 05ac9e8374fc7fce458fa4fff3d41200b53a1751..0a8c5fbcdbf609ef5577aacd5bd4266ebefe258e 100644 (file)
@@ -33,6 +33,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index 539af36c51e3d478a704ed7514cf0b4fbf157b97..67453e6fd4e868d14befb691da83192f0003c998 100644 (file)
@@ -31,6 +31,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index bbf5c0b2e8ecda07899664d0db4abfe454c26460..f6a65d110751980edd9c6f155acf4d84e6b8e14f 100755 (executable)
@@ -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
index 292ddb757ad13de0c00d193ae1fd8c8666065ee3..d61f467267e209f4dc21ccbeb90a928d6275cecb 100755 (executable)
@@ -22,6 +22,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index bd6bd98cadf7f6978cf11a6b363124eb1a0e46d5..b2bb5835ae8a5c47a08480d8146ed6b0658868fb 100755 (executable)
@@ -22,6 +22,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index 123a90dbaec274e93978d08e0770836e3fc49bb2..1107763a3785457d58e48f6e595f0c2c2cea320d 100755 (executable)
@@ -24,6 +24,10 @@ set_state() {
                status_led_blink_failsafe
                ;;
 
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
+
        done)
                status_led_on
                ;;
index 07570b9188bfe26d46a2bda0b371a15f80a471b9..adba975edede7be724f981726ea47e168b5959a6 100755 (executable)
@@ -22,6 +22,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index 683e1234d589da5a250269d1b22e8d752cb0f0c8..11b1f75fae337c29bf0b0470d1861b1a7ffa3aa2 100644 (file)
@@ -28,6 +28,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index ba42218049fd4f89d60abec326dcff6aa077c069..5370696b44d88aac7146a58ca71379f20a03145a 100755 (executable)
@@ -28,6 +28,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;
index f50ae1fe7ffe6008cc3df67b8c57ae556d40f83e..1af64b2770951358594412807779466892ae8cde 100755 (executable)
@@ -227,6 +227,9 @@ set_state() {
        failsafe)
                status_led_blink_failsafe
                ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
        done)
                status_led_on
                ;;