[MINI2440] Updated defconfig to add (optional) packages
[openwrt/mini2440.git] / target / linux / ar7 / base-files / etc / diag.sh
blob0ce17cae89e2fbec79e6874cdb3485615ad59498
1 #!/bin/sh
2 # Copyright (C) 2007 OpenWrt.org
4 # This setup gives us 3.5 distinguishable states:
6 # Solid OFF: Bootloader running, or kernel hung (timer task stalled)
7 # Solid ON: Kernel hung (timer task stalled)
8 # 5Hz blink: preinit
9 # Heartbeat: normal operation
11 set_state() {
12 case "$1" in
13 preinit)
14 [ -d /sys/class/leds/status ] && {
15 echo timer >/sys/class/leds/status/trigger
16 echo 100 >/sys/class/leds/status/delay_on
17 echo 100 >/sys/class/leds/status/delay_off
20 done)
21 [ -d /sys/class/leds/status ] && {
22 echo heartbeat >/sys/class/leds/status/trigger
25 esac