[toolchain] eglibc: add support for 2.14
[openwrt.git] / target / linux / ar7 / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2007 OpenWrt.org
3
4 # This setup gives us 4.5 distinguishable states:
5 #
6 # Solid OFF: Bootloader running, or kernel hung (timer task stalled)
7 # Solid ON: Kernel hung (timer task stalled)
8 # 5Hz blink: preinit
9 # 10Hz blink: failsafe
10 # Heartbeat: normal operation
11
12 set_state() {
13 case "$1" in
14 preinit)
15 [ -d /sys/class/leds/status ] && {
16 echo timer >/sys/class/leds/status/trigger
17 echo 100 >/sys/class/leds/status/delay_on
18 echo 100 >/sys/class/leds/status/delay_off
19 }
20 ;;
21 failsafe)
22 [ -d /sys/class/leds/status ] && {
23 echo timer >/sys/class/leds/status/trigger
24 echo 50 >/sys/class/leds/status/delay_on
25 echo 50 >/sys/class/leds/status/delay_off
26 }
27 ;;
28 done)
29 [ -d /sys/class/leds/status ] && {
30 echo heartbeat >/sys/class/leds/status/trigger
31 }
32 ;;
33 esac
34 }
This page took 0.047055 seconds and 5 git commands to generate.