openwrtv4/package/network/config/ltq-vdsl-app/files/dsl_control
John Crispin f464b7d176 lantiq: cleanup the dsl control scripts
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40381
2014-04-05 16:34:20 +00:00

42 lines
793 B
Bash

#!/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
. /lib/functions/lantiq_dsl.sh
XDSL_CTRL=vdsl_cpe_control
start() {
local firmware xtu
config_load network
config_get firmware wan firmware
[ -z "${firmware}" ] &&
firmware=vdsl.bin
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}
}
stop() {
DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
DSL_INTERFACE_STATUS="DOWN" \
/sbin/dsl_notify.sh
service_stop /sbin/vdsl_cpe_control
}