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
This commit is contained in:
parent
0100a8a68e
commit
9762c54914
1 changed files with 7 additions and 3 deletions
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/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
|
# Basic functions to send CLI commands to the vdsl_cpe_control daemon
|
||||||
|
@ -212,7 +216,7 @@ line_state() {
|
||||||
*) s="unknown" ;;
|
*) s="unknown" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ $action = "lucistat" ]; then
|
if [ "$action" = "lucistat" ]; then
|
||||||
echo "dsl.line_state_num=$ls"
|
echo "dsl.line_state_num=$ls"
|
||||||
echo "dsl.line_state_detail=\"$s\""
|
echo "dsl.line_state_detail=\"$s\""
|
||||||
if [ "$ls" = "0x801" ]; then
|
if [ "$ls" = "0x801" ]; then
|
||||||
|
|
Loading…
Reference in a new issue