diff options
author | John Crispin <john@openwrt.org> | 2016-01-01 21:18:38 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2016-01-01 21:18:38 +0000 |
commit | ebc71a4d1646eb88cf71e301c085a2dfa5d1efcf (patch) | |
tree | 92e43b7fbf1f14f78de7ed14804f761fc192b673 /target/linux/lantiq/base-files/sbin | |
parent | a3c3b2a9a800b9ad30e1aea1b3296fd5be20bd8f (diff) | |
download | upstream-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-x | target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 |
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 |