diff options
Diffstat (limited to 'target/linux/lantiq')
3 files changed, 59 insertions, 2 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 817e2e91c5..3584b0be60 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -21,7 +21,7 @@ led_usb2="$(lantiq_get_dt_led usb2)" led_dsl="$(lantiq_get_dt_led dsl)" [ -n "$led_dsl" ] && { interface="nas0" - lantiq_is_vdsl_system && interface="ptm0" + lantiq_is_vdsl_system && interface="dsl0" led_internet="$(lantiq_get_dt_led internet)" if [ -n "$led_internet" ]; then diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network index 2feeb9c208..bc5c410e65 100755 --- a/target/linux/lantiq/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/base-files/etc/board.d/02_network @@ -199,7 +199,7 @@ ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \ ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload" if lantiq_is_vdsl_system; then - interface_wan="ptm0" + interface_wan="dsl0" ucidef_add_vdsl_modem "$annex" "$tone" "$xfer_mode" else interface_wan="nas0" diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface new file mode 100644 index 0000000000..1a7cd337e7 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface @@ -0,0 +1,57 @@ +#!/bin/sh + +. /lib/functions.sh +. /lib/functions/lantiq.sh + +IFNAME_CHANGED=0 + +rename_xdsl_ifname() +{ + local cfg="$1" + local section="$2" + local option="$3" + local name + + config_get name ${section} $option + case $name in + nas0*) + name=${name/nas0/dsl0} + ;; + ptm0*) + name=${name/ptm0/dsl0} + ;; + *) + return + ;; + esac + + uci set ${cfg}.${section}.$option=$name + IFNAME_CHANGED=1 +} + +migrate_network_xdsl_ifname() +{ + rename_xdsl_ifname network "$1" ifname + rename_xdsl_ifname network "$1" name +} + +migrate_led_xdsl_ifname() +{ + rename_xdsl_ifname system "$1" dev +} + +lantiq_is_vdsl_system || exit 0 + +config_load network +config_foreach migrate_network_xdsl_ifname + +[ "$IFNAME_CHANGED" = "1" ] && uci commit network + +IFNAME_CHANGED=0 + +config_load system +config_foreach migrate_led_xdsl_ifname led + +[ "$IFNAME_CHANGED" = "1" ] && uci commit system + +exit 0 |