View Single Post

  #2 (permalink)  
Old 01-10-2004
Alan Connor
 
Posts: n/a
Default Re: Well I managed to connect to the internet!

On Fri, 09 Jan 2004 23:40:42 -0500, Iguanaman <iggyman25@hotmail.com> wrote:
>
>
> Many thanks, I managed to connect to the internet using a pppd line
> like this:
> /usr/sbin/pppd /dev/ttyS1 115200 debug user dwlee connect
> "/usr/sbin/chat -v '' ATDT5472107 CONNECT''"
>
> The only problem is that it does not set the default route
> automatically, so I have to enter this line to make the internet
> scautly work:
>
> route add default ppp0
>
> That does not bother me too much, but I want it to do it
> automatically. Thanks for all your help!
>
> Iguanaman


Good work!

Why don't you just put all that in a script?

#!/bin/sh

/usr/sbin.....

while true do;

if /sbin/ifconfig | grep 'ppp0' &> /dev/null ; then

# check and see if your ppp interface is up, and if it is:

route add......

exit 0

else continue; fi; done

# if it isn't, check again until it is


(may need some tweaking, but I use one almost identical to it for the
same purpose)


Call it ppu (or my_nifty_internet_connection_script :-), run chmod +rx on it
and put it in /usr/local/bin.

Then you can just enter ppu at the prompt and it's done.

$type ppu

will tell you whether the string is taken for a function, script, application,
variable or alias...

AC

Reply With Quote