base-files: procd is now the init process
[openwrt.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                 insmod leds-gpio
21                 status_led_blink_preinit
22                 ;;
23         failsafe)
24                 status_led_blink_failsafe
25                 ;;
26         done)
27                 status_led_on
28                 ;;
29         esac
30 }