summaryrefslogtreecommitdiff
path: root/target/linux/lantiq
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-10-29 08:23:47 +0000
committerJohn Crispin <john@openwrt.org>2014-10-29 08:23:47 +0000
commit9762c549149e1226a3affe43df71aa14379bd5d5 (patch)
tree7255467c28583a88a0b6307e10e3b5bfbbfee23e /target/linux/lantiq
parent0100a8a68ef51ead7d1c570bcc33fb36493fbf00 (diff)
downloadmtk-20170518-9762c549149e1226a3affe43df71aa14379bd5d5.zip
mtk-20170518-9762c549149e1226a3affe43df71aa14379bd5d5.tar.gz
mtk-20170518-9762c549149e1226a3affe43df71aa14379bd5d5.tar.bz2
lantiq_dsl.sh: properly detect vdsl_cpe_control and add missing quotes
lantiq_dsl.sh didn't work with VDSL chipsets for now, fix that by detecting whether vdsl_cpe_control or dsl_cpe_control should be used. Also add missing quotes around shell string comparision. Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 43101
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r--target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
index e817fdd..56b8652 100644
--- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
+++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
@@ -1,7 +1,11 @@
#!/bin/sh /etc/rc.common
-# Copyright (C) 2012 OpenWrt.org
+# Copyright (C) 2012-2014 OpenWrt.org
-XDSL_CTRL=dsl_cpe_control
+if [ "$( which vdsl_cpe_control )" ]; then
+ XDSL_CTRL=vdsl_cpe_control
+else
+ XDSL_CTRL=dsl_cpe_control
+fi
#
# Basic functions to send CLI commands to the vdsl_cpe_control daemon
@@ -212,7 +216,7 @@ line_state() {
*) s="unknown" ;;
esac
- if [ $action = "lucistat" ]; then
+ if [ "$action" = "lucistat" ]; then
echo "dsl.line_state_num=$ls"
echo "dsl.line_state_detail=\"$s\""
if [ "$ls" = "0x801" ]; then