openwrt/target/linux/lantiq/base-files/etc/diag.sh
John Crispin d9bb7ff7a5 Migrate lantiq platform to common led helper functions
http://patchwork.openwrt.org/patch/3316/

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 36187
2013-04-03 10:01:07 +00:00

25 lines
357 B
Bash

#!/bin/sh
# Copyright (C) 2012-2013 OpenWrt.org
. /lib/functions/leds.sh
status_led="power"
set_state() {
case "$1" in
preinit)
status_led_set_heartbeat
;;
failsafe)
[ -d /sys/class/leds/power1 ] && {
status_led_off
led_timer "power1" 100 100
} || status_led_set_timer 100 100
;;
done)
status_led_on
led_off "power1"
;;
esac
}