mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user