From 5b5a4abf83eb1c3d2a3403a6e61b682ebfe8e409 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 29 Oct 2014 08:23:47 +0000 Subject: 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43101 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'target/linux/lantiq/base-files') 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 e817fdd6b4..56b8652588 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 -- cgit v1.2.3