ipq806x: add diag.sh script
[openwrt/staging/chunkeey.git] / target / linux / ipq806x / base-files / etc / diag.sh
1 #!/bin/sh
2
3 . /lib/functions/leds.sh
4 . /lib/ipq806x.sh
5
6 get_status_led() {
7 case $(ipq806x_board_name) in
8 c2600)
9 status_led="status:blue"
10 ;;
11 esac
12 }
13
14 set_state() {
15 get_status_led
16
17 case "$1" in
18 preinit)
19 status_led_blink_preinit
20 ;;
21 failsafe)
22 status_led_blink_failsafe
23 ;;
24 preinit_regular)
25 status_led_blink_preinit_regular
26 ;;
27 done)
28 status_led_on
29 ;;
30 esac
31 }