2012-01-24 11:31:23 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2012-10-23 19:57:47 +00:00
|
|
|
# Copyright (C) 2012 OpenWrt.org
|
2012-01-24 11:31:23 +00:00
|
|
|
|
2012-10-23 19:57:47 +00:00
|
|
|
START=99
|
2012-02-14 15:05:49 +00:00
|
|
|
|
2012-01-24 11:31:23 +00:00
|
|
|
EXTRA_COMMANDS="status lucistat"
|
|
|
|
EXTRA_HELP=" status Get DSL status information
|
|
|
|
lucistat Get status information if lua friendly format"
|
|
|
|
|
|
|
|
SERVICE_DAEMONIZE=1
|
|
|
|
SERVICE_WRITE_PID=1
|
|
|
|
|
2014-04-05 16:34:20 +00:00
|
|
|
. /lib/functions/lantiq_dsl.sh
|
2012-02-14 15:05:49 +00:00
|
|
|
|
|
|
|
annex_b=10_00_10_00_00_04_00_00
|
|
|
|
annex_bdmt=10_00_00_00_00_00_00_00
|
|
|
|
annex_b2=00_00_10_00_00_00_00_00
|
|
|
|
annex_b2p=00_00_00_00_00_04_00_00
|
|
|
|
annex_a=04_01_04_00_00_01_00_00
|
|
|
|
annex_at1=01_00_00_00_00_00_00_00
|
|
|
|
annex_alite=00_01_00_00_00_00_00_00
|
|
|
|
annex_admt=04_00_00_00_00_00_00_00
|
|
|
|
annex_a2=00_00_04_00_00_00_00_00
|
|
|
|
annex_a2p=00_00_00_00_00_01_00_00
|
|
|
|
annex_l=00_00_00_00_04_00_00_00
|
|
|
|
annex_m=00_00_00_00_40_00_04_00
|
|
|
|
annex_m2=00_00_00_00_40_00_00_00
|
|
|
|
annex_m2p=00_00_00_00_00_00_04_00
|
|
|
|
|
2012-01-24 11:31:23 +00:00
|
|
|
start() {
|
2012-02-14 15:05:49 +00:00
|
|
|
local annex
|
2012-12-21 13:47:25 +00:00
|
|
|
local firmware
|
2012-02-14 15:05:49 +00:00
|
|
|
local xtu
|
|
|
|
config_load network
|
2012-12-21 13:47:25 +00:00
|
|
|
config_get annex wan annex
|
|
|
|
config_get firmware wan firmware
|
2012-02-14 15:05:49 +00:00
|
|
|
|
|
|
|
eval "xtu=\"\${annex_$annex}\""
|
|
|
|
|
2012-12-21 13:47:25 +00:00
|
|
|
[ -z "${firmware}" ] &&
|
|
|
|
firmware=adsl.bin
|
2012-03-25 08:50:45 +00:00
|
|
|
|
2012-02-14 15:05:49 +00:00
|
|
|
service_start /sbin/dsl_cpe_control -i${xtu} \
|
2012-01-24 11:31:23 +00:00
|
|
|
-n /sbin/dsl_notify.sh \
|
2012-12-21 13:47:25 +00:00
|
|
|
-f /lib/firmware/${firmware}
|
2012-01-24 11:31:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
|
|
|
|
DSL_INTERFACE_STATUS="DOWN" \
|
2012-12-21 13:47:25 +00:00
|
|
|
/sbin/dsl_notify.sh
|
2012-01-24 11:31:23 +00:00
|
|
|
|
|
|
|
service_stop /sbin/dsl_cpe_control
|
|
|
|
}
|
|
|
|
|