8f248238517476dc1ff5bffc886c2888f8022fff
[openwrt/svn-archive/archive.git] / package / network / config / ltq-vdsl-app / files / dsl_control
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2012 OpenWrt.org
3
4 START=99
5
6 EXTRA_COMMANDS="status lucistat"
7 EXTRA_HELP=" status Get DSL status information
8 lucistat Get status information if lua friendly format"
9
10 SERVICE_DAEMONIZE=1
11 SERVICE_WRITE_PID=1
12
13 . /lib/functions/lantiq_dsl.sh
14 XDSL_CTRL=vdsl_cpe_control
15
16 start() {
17 local firmware xtu
18
19 config_load network
20
21 config_get firmware wan firmware
22 [ -z "${firmware}" ] &&
23 firmware=vdsl.bin
24
25 config_get xtu wan xtu
26 [ -z "${xtu}" ] &&
27 xtu=10_00_10_00_00_04_01_07
28
29 service_start /sbin/vdsl_cpe_control \
30 -i${xtu} \
31 -T4_0_1
32 -n /sbin/dsl_notify.sh \
33 -f /lib/firmware/${firmware}
34 }
35
36 stop() {
37 DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
38 DSL_INTERFACE_STATUS="DOWN" \
39 /sbin/dsl_notify.sh
40
41 service_stop /sbin/vdsl_cpe_control
42 }