Help debugging adsl dial script.
Hi,
I have got as far as getting my speedtouch 330 (Revision 4) to connect the internet by following the instructions on http://www.linux-usb.org/SpeedTouch/ubuntu/index.html I am using Kubuntu Edgy 6.10 I tested the setup by entering the following command # sudo pppd call speedtch This resulted in a successful connection. Fine so far. I then issued the following command to shut down pppd # sudo killall pppd and followed up with the command # sudo /etc/init.d/dial The result of the last command was: /etc/init.d/dial:line 5:while[[0-lt 40]]: command not found /etc/init.d/dial:line 6:syntax error near unexpected token 'do' /etc/init.d/dial:line 6:'do' The bash script 'dial' is as follows #!/bin/bash modprobe ppp_generic modprobe pppoatm count=0 while [[ $((count++)) -lt 40 ]] do sync=$(dmesg | grep 'ADSL line is up') if [ ! -z "$sync" ] then pppd call speedtch exit 0 fi sleep 1 done echo "The SpeedTouch firmware did not load" I would appreciate some help in debugging the above script or finding another way of connecting automatically at boot time. Thanks, David :) |
Maybe something like:
Code:
#!/bin/sh |
Hi djsbriscoe,
I don't have that hardware but the script is very simple and should work. I copied it and commented the portions that are not of interest for the error you are reporting and it worked without any problem. However, looking for the error line, it seems that you copied the script from the site to show us and your actual has little differences; I see that you didn't respect the space separation on the while line: Code:
/etc/init.d/dial:line 5:while[[0-lt 40]]: command not found Code:
while[[$((count++))-lt 40]] Code:
while [[ $((count++)) -lt 40 ]] Osvaldo. |
All times are GMT -5. The time now is 09:38 AM. |