@@ -12,6 +12,7 @@ board_config_update
[ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt"
[ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1"
[ -e "/sys/class/leds/usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "usb2" "2-1"
+[ -e "/sys/class/leds/dsl" ] && ucidef_set_led_default "dsl" "dsl" "dsl" "0"
[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan"
board=$(lantiq_board_name)
@@ -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
Signed-off-by: Mathias Kresin <openwrt@kresin.me> --- target/linux/lantiq/base-files/etc/board.d/01_leds | 1 + target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-)