2013-03-15 02:43:13 +08:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2012 OpenWrt.org
|
|
|
|
|
|
|
|
START=99
|
|
|
|
|
|
|
|
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-06 00:34:20 +08:00
|
|
|
. /lib/functions/lantiq_dsl.sh
|
|
|
|
XDSL_CTRL=vdsl_cpe_control
|
2013-03-15 02:43:13 +08:00
|
|
|
|
|
|
|
start() {
|
2014-04-06 00:34:20 +08:00
|
|
|
local firmware xtu
|
|
|
|
|
2013-03-15 02:43:13 +08:00
|
|
|
config_load network
|
2014-04-06 00:34:20 +08:00
|
|
|
|
2013-03-15 02:43:13 +08:00
|
|
|
config_get firmware wan firmware
|
|
|
|
[ -z "${firmware}" ] &&
|
|
|
|
firmware=vdsl.bin
|
|
|
|
|
2014-04-06 00:34:20 +08:00
|
|
|
config_get xtu wan xtu
|
|
|
|
[ -z "${xtu}" ] &&
|
|
|
|
xtu=10_00_10_00_00_04_01_07
|
|
|
|
|
|
|
|
service_start /sbin/vdsl_cpe_control \
|
|
|
|
-i${xtu} \
|
|
|
|
-T4_0_1
|
|
|
|
-n /sbin/dsl_notify.sh \
|
|
|
|
-f /lib/firmware/${firmware}
|
2013-03-15 02:43:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
|
|
|
|
DSL_INTERFACE_STATUS="DOWN" \
|
|
|
|
/sbin/dsl_notify.sh
|
|
|
|
|
|
|
|
service_stop /sbin/vdsl_cpe_control
|
|
|
|
}
|