aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq/base-files')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/01_leds16
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration27
2 files changed, 35 insertions, 8 deletions
diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds
index b6461f9e9a..634f479789 100755
--- a/target/linux/lantiq/base-files/etc/board.d/01_leds
+++ b/target/linux/lantiq/base-files/etc/board.d/01_leds
@@ -18,18 +18,18 @@ led_usb="$(lantiq_get_dt_led usb)"
led_usb2="$(lantiq_get_dt_led usb2)"
[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1"
-led_internet="$(lantiq_get_dt_led internet)"
-[ -n "$led_internet" ] && {
+led_dsl="$(lantiq_get_dt_led dsl)"
+[ -n "$led_dsl" ] && {
interface="nas0"
lantiq_is_vdsl_system && interface="ptm0"
- led_dsl="$(lantiq_get_dt_led dsl)"
- [ -n "$led_dsl" ] && {
- interface="pppoe-wan"
+ led_internet="$(lantiq_get_dt_led internet)"
+ if [ -n "$led_internet" ]; then
ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0"
- }
-
- ucidef_set_led_netdev "internet" "internet" "$led_internet" "$interface"
+ ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan"
+ else
+ ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "$interface"
+ fi
}
board=$(board_name)
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
index 130694a62b..6ff4355853 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
@@ -35,6 +35,20 @@ do_led_update_sysfs()
done;
}
+do_internet_led_rename()
+{
+ config_load system
+
+ [ -n $(config_get led_internet name) ] || return
+ [ -z $(config_get led_dsl name) ] || return
+
+ uci rename system.led_internet=led_dsl
+ uci set system.led_dsl.name=dsl
+
+ LED_OPTIONS_CHANGED=1
+ logger -t led-migration "internet led renamed to dsl"
+}
+
migrate_leds()
{
config_load system
@@ -42,6 +56,19 @@ migrate_leds()
}
case "$(board_name)" in
+ARV452CQW|\
+ARV7510PW22|\
+ARV7519RW22|\
+ARV752DPW|\
+ARV752DPW22|\
+ASL56026|\
+BTHOMEHUBV2B|\
+BTHOMEHUBV3A|\
+BTHOMEHUBV5A|\
+FRTZ7360SL|\
+VG3503J)
+ do_internet_led_rename
+ ;;
DGN3500*)
migrate_leds "dgn3500:blue:wireless=dgn3500:green:wireless"
;;