diff options
Diffstat (limited to 'target/linux/lantiq/base-files/etc/diag.sh')
-rw-r--r-- | target/linux/lantiq/base-files/etc/diag.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh new file mode 100644 index 000000000..9e0e1701c --- /dev/null +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -0,0 +1,24 @@ +#!/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 +} |