targets: base-files: diag.sh does not need to be executable
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2007-2013 OpenWrt.org
3
4 . /lib/functions/leds.sh
5 . /lib/brcm63xx.sh
6
7 set_state() {
8 case "$1" in
9 preinit)
10 status_led_set_timer 200 200
11 ;;
12 failsafe)
13 status_led_set_timer 50 50
14 ;;
15 preinit_regular)
16 status_led_set_timer 500 500
17 ;;
18 done)
19 if [ "${status_led/power}" != "$status_led" ]; then
20 status_led_on
21 else
22 status_led_off
23 fi
24 ;;
25 esac
26 }