aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/sbin
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-01-01 21:18:38 +0000
committerJohn Crispin <john@openwrt.org>2016-01-01 21:18:38 +0000
commitebc71a4d1646eb88cf71e301c085a2dfa5d1efcf (patch)
tree92e43b7fbf1f14f78de7ed14804f761fc192b673 /target/linux/lantiq/base-files/sbin
parenta3c3b2a9a800b9ad30e1aea1b3296fd5be20bd8f (diff)
downloadupstream-ebc71a4d1646eb88cf71e301c085a2dfa5d1efcf.tar.gz
upstream-ebc71a4d1646eb88cf71e301c085a2dfa5d1efcf.tar.bz2
upstream-ebc71a4d1646eb88cf71e301c085a2dfa5d1efcf.zip
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
Diffstat (limited to 'target/linux/lantiq/base-files/sbin')
-rwxr-xr-xtarget/linux/lantiq/base-files/sbin/dsl_notify.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/lantiq/base-files/sbin/dsl_notify.sh b/target/linux/lantiq/base-files/sbin/dsl_notify.sh
index b514e257d4..01d04881c4 100755
--- a/target/linux/lantiq/base-files/sbin/dsl_notify.sh
+++ b/target/linux/lantiq/base-files/sbin/dsl_notify.sh
@@ -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