projects
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[lantiq] Migrate lantiq platform to common led helper functions
[openwrt.git]
/
target
/
linux
/
lantiq
/
base-files
/
etc
/
diag.sh
1
#!/bin/sh
2
# Copyright (C) 2012-2013 OpenWrt.org
3
4
. /lib/functions/leds.sh
5
6
status_led="power"
7
8
set_state() {
9
case "$1" in
10
preinit)
11
status_led_set_heartbeat
12
;;
13
failsafe)
14
[ -d /sys/class/leds/power1 ] && {
15
status_led_off
16
led_timer "power1" 100 100
17
} || status_led_set_timer 100 100
18
;;
19
done)
20
status_led_on
21
led_off "power1"
22
;;
23
esac
24
}