diff options
author | John Crispin <blogic@openwrt.org> | 2013-06-10 08:25:02 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-06-10 08:25:02 +0000 |
commit | 80ecbd519718df0eee4b99ede01f5b66a94611da (patch) | |
tree | f551d466fc473dcffe050f5576c6d1b9e07d388b /target/linux | |
parent | ecb32a2174fc391810491eccc0e3063e40c2ebb4 (diff) | |
download | master-187ad058-80ecbd519718df0eee4b99ede01f5b66a94611da.tar.gz master-187ad058-80ecbd519718df0eee4b99ede01f5b66a94611da.tar.bz2 master-187ad058-80ecbd519718df0eee4b99ede01f5b66a94611da.zip |
lantiq: diag.sh with both red and green power LEDs
This provides a boot LED sequence suitable for devices with both red and
green LEDs for power. This assumes no "default-on" settings in the
device tree.
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36899 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/lantiq/base-files/etc/diag.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 9e0e1701cb..a6cb823581 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -6,6 +6,26 @@ status_led="power" set_state() { + [ -d /sys/class/leds/power2/ ] && { + + case "$1" in + preinit) + led_set_attr "power2" "trigger" "heartbeat" + ;; + init) + status_led_on + ;; + failsafe) + led_off "power2" + status_led_set_timer 100 100 + ;; + done) + led_off "power2" + ;; + esac + return + } + case "$1" in preinit) status_led_set_heartbeat |