base-files: diag does not need to insmod any drivers, procd already did it for us
[openwrt/svn-archive/archive.git] / target / linux / cns21xx / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2010-2013 OpenWrt.org
3
4 . /lib/functions/leds.sh
5 . /lib/cns21xx.sh
6
7 get_status_led() {
8 case $(get_board_name) in
9 ns-k330)
10 status_led="ns-k330:red:link"
11 ;;
12 esac;
13 }
14
15 set_state() {
16 get_status_led
17
18 case "$1" in
19 preinit)
20 status_led_blink_preinit
21 ;;
22 failsafe)
23 status_led_blink_failsafe
24 ;;
25 done)
26 status_led_on
27 ;;
28 esac
29 }