Setting Up Connection In Ubuntu Linux

QUOTE(powerontop @ Dec 12 2006, 12:40 PM) [snapback]70706[/snapback]
.......

3. Then whenever u want to start the connection type: pon dsl-provider
4. for off'ing it type: poff.

Now comes the main question. How do you automate it. This is where I too was in doubts but not helpless. All Linuxes come with a program called "cron" (I am sure u must have heard it). So simply setup cron with whatever time u want to run the above commands.

I have fully automated my downloads using Azureus and I can now proudly say, I am enjoying my sleep 🙂
Best of luck.[/b]

What 'pon dsl-provider' does is that it tries to dial the connection once. But I hardly get connected in a single attempt (I don't know why this happens, I haven't found a solution till date. Maybe it depends on the SNR Margin or something, and I'm sure it's not a software fault because I face the same problem in Linux). What I do in Windows is that I schedule a .bat file which contains the following script -


@ECHO OFF

:loop
Echo Trying to Dial your connection.........
rasdial DSLname username password

if NOT %ERRORLEVEL% ==0 goto failed

Exit
:failed
cls

Echo Failed to connect....will retry

goto loop




This loop runs until I get connected. What I need is a similar script which I can use to automate the process in Linux. If I just schedule 'pon dsl-provider' it will try to dial the connection once irrespective of the success or failure of the connection. I want a script (or command which has a condition to check whether I'm connected or not and if I'm not, then it redials the connection. In Windows to do it manually, I've set options in my connection like this -
 
Ofcourse you could put this in a loop with trying to ping some well known host. If you get positive reply you are ON else, rerun pon again. Whats the deal?
 
QUOTE(powerontop @ Jan 25 2007, 06:34 PM) [snapback]76805[/snapback]
Ofcourse you could put this in a loop with trying to ping some well known host. If you get positive reply you are ON else, rerun pon again. Whats the deal?[/b]


The deal is that I'm a Linux newbie, and I don't know how to do that.
 
Ok, so I've heard from a thousand people about cron and how easy to use it is, but unfortunately I don't share the same view. I didn't find a cool guide on ubuntuforums.org.
I tried the wiki, but it didn't help me a great deal either.

https://help.ubuntu.com/community/CronHowto


How do I schedule dialling of my connection and that ping to a server and then recheck and then redial?
 
I use the default BT client in Ubuntu.Which one owrks easily and is the best?I am getting pathetic speeds.
 


QUOTE(Apoorv Khatreja @ Jan 27 2007, 12:31 AM) [snapback]77096[/snapback]
Ok, so I've heard from a thousand people about cron and how easy to use it is, but unfortunately I don't share the same view. I didn't find a cool guide on ubuntuforums.org.
I tried the wiki, but it didn't help me a great deal either.

https://help.ubuntu.com/community/CronHowto
How do I schedule dialling of my connection and that ping to a server and then recheck and then redial?[/b]

Just like you wrote a small batch file for Windows and executed it using the Windows scheduler, you can do the same thing in Linux.

[*]You need to create a shell script (equivalent of your .bat file) that does the tasks you want done. From your example in this thread, the shell script should not be a very complex task. Read an "Intro to BASH shell programming" paper to get an idea of the constructs (Google gives several sites).
[*]Make sure you test it.
[*]After testing, invoke the shell scripts at specific times using cron. Read man 5 crontab for the format of each entry. NOTE: the shell script needs to be run as root if it does anything that requires root permissions.
[/list]
 
I'm afraid you quoted my post and still didn't answer what I was asking for. I don't know how to configure cron, or how to schedule a task or script using cron. You just told me what I already know.
 
I still haven't got an answer to my problem.

Ofcourse you could put this in a loop with trying to ping some well known host. If you get positive reply you are ON else, rerun pon again. Whats the deal?[/b]


I still don't know how to do this in Ubuntu using cron. Due to this everytime I'm on Linux, I have to shift back to PPPoE mode for using the internet 🙁 .
 
I'm afraid you quoted my post and still didn't answer what I was asking for. I don't know how to configure cron, or how to schedule a task or script using cron. You just told me what I already know.

Install webmin. CRON will be a piece of cake for you 😉
 
@ dips0502Thanks, dude. I'll try it out, though I'm not using Ubuntu right now, I'll try it out on PCLinuxOS.
 

Top