1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2012 OpenWrt.org
4 # needs to start before the atm layer which starts at 50
8 EXTRA_COMMANDS
="status lucistat"
9 EXTRA_HELP
=" status Get DSL status information
10 lucistat Get status information if lua friendly format"
12 [ -f /lib
/functions
/lantiq_dsl.sh
] && .
/lib
/functions
/lantiq_dsl.sh
20 xtse_adsl_a
="04 01 04 01 00 01 00 00"
26 xtse_adsl_b
="10 00 10 00 00 04 00 00"
34 xtse_adsl_j
="10 00 10 40 00 04 01 00"
36 xtse_vdsl
="00 00 00 00 00 00 00 07"
39 procd_add_reload_trigger network
50 config_get annex dsl annex
51 config_get firmware dsl firmware
52 config_get xfer_mode dsl xfer_mode
54 [ -z "${xfer_mode}" ] && xfer_mode
=ptm
56 case "${xfer_mode}" in
69 eval "xtse_adsl=\"\${xtse_adsl_$annex}\""
70 if [ "${xtse_adsl}" ]; then
76 [ -z "${firmware}" ] && firmware
=/lib
/firmware
/vdsl.bin
77 [ -f "${firmware}" ] ||
{
78 echo failed to
find $firmware
83 procd_set_param
command /sbin
/vdsl_cpe_control_wrapper \
84 -i`echo $xtse | sed "s/ /_/g"` \
85 -n /sbin
/dsl_notify.sh \
88 procd_append_param env
"LOAD=$LOAD" "UNLOAD=$UNLOAD"
93 DSL_NOTIFICATION_TYPE
="DSL_INTERFACE_STATUS" \
94 DSL_INTERFACE_STATUS
="DOWN" \