mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
64a07e6a8b
the IB tries to run the enable target on all init.d scripts. It fails when including the dsl_control helper. Check for existence prior to the include. Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41787
60 lines
1.3 KiB
Bash
60 lines
1.3 KiB
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
|
|
|
|
[ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh
|
|
|
|
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
|
|
|
|
start() {
|
|
local annex
|
|
local firmware
|
|
local xtu
|
|
config_load network
|
|
config_get annex dsl annex
|
|
config_get firmware dsl firmware
|
|
|
|
eval "xtu=\"\${annex_$annex}\""
|
|
|
|
[ -z "${firmware}" ] &&
|
|
firmware=/lib/firmware/adsl.bin
|
|
[ -f "${firmware}" ] || {
|
|
echo failed to find $firmware
|
|
return 1
|
|
}
|
|
|
|
service_start /sbin/dsl_cpe_control -i${xtu} \
|
|
-n /sbin/dsl_notify.sh \
|
|
-f ${firmware}
|
|
}
|
|
|
|
stop() {
|
|
DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
|
|
DSL_INTERFACE_STATUS="DOWN" \
|
|
/sbin/dsl_notify.sh
|
|
|
|
service_stop /sbin/dsl_cpe_control
|
|
}
|
|
|