forked from Ivasoft/openwrt
lantiq: use dsl led defined in DTS
dsl_control (dsl_notify.sh) is the only process which is aware of the state of the atm/ptm interface. Use the dsl led exclusive for the dsl line state. On boards which don't have a distinct internet and a dsl led, let the netdev status of the atm interface trigger the shared led. Triggering the shared led according to the status of the ppp interface isn't suitable, since the led would be switched of if the ppp connection goes down, but the line is still in sync. Signed-off-by: Mathias Kresin <openwrt@kresin.me> SVN-Revision: 48040
This commit is contained in:
@@ -16,15 +16,15 @@
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
|
||||
local default
|
||||
local led
|
||||
config_load system
|
||||
config_get default led_adsl default
|
||||
if [ "$default" != 1 ]; then
|
||||
config_get led led_dsl sysfs
|
||||
if [ -n "$led" ]; then
|
||||
case "$DSL_INTERFACE_STATUS" in
|
||||
"HANDSHAKE") led_timer dsl 500 500;;
|
||||
"TRAINING") led_timer dsl 200 200;;
|
||||
"UP") led_on dsl;;
|
||||
*) led_off dsl
|
||||
"HANDSHAKE") led_timer $led 500 500;;
|
||||
"TRAINING") led_timer $led 200 200;;
|
||||
"UP") led_on $led;;
|
||||
*) led_off $led
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user