[wellylug] easy dialup settings?
Rob Stockley
robstockley at mowgli.net.nz
Sun Nov 23 14:42:01 NZDT 2003
On Mon, 2003-11-24 at 03:11, James Fitzsimons wrote:
> Hi Rob,
> thanks for the suggestion. I will give it a go and see how it works out.
> Hopefully I can convince my wife that the terminal isn't as scary as it
> looks!
>
> Cheers,
> James
>
> On Sun, 2003-11-23 at 06:31, Rob Stockley wrote:
> > On Sun, 2003-11-23 at 04:12, James Fitzsimons wrote:
> > > Hi all,
> > > I am trying to think of a way that would enable my wife (not Linux
> > > savvy) to be able to dial and disconnect from our ISP.
> > >
> > > Ideally what I would like is an icon I can put on her kde desktop which
> > > would work they same way as a dialup shortcut in windows.
> > >
> > > At the moment I have to go through the following commands to dial out:
> > > - su to root
> > > - slmodemd /dev/slamr0 // this starts a user mode daemon for my winmodem
> > > in my laptop
> > > - ppp start // actually calls the ISP
> > >
> > > I would like to avoid my wife having to open terminal windows and change
> > > user to root etc... as aside from the obvious risks to the system, she
> > > will probably freak out ;-)
> > >
> > > Any suggestions would be much appreciated!
> > > James Fitzsimons
> >
> > Script it and use sudo
> >
> > Rob
> >
>
You could use something like the the script below. The method is pretty
crude but I've seen it suggested on the net before. Stick it somewhere
like /usr/local/sbin.
HTH
Rob
#!/bin/bash
# ppplatch script to turn internet off/on
# Set this to the IP you'll poll to see if the link is up
# This example is a nameserver from nzoom
REMOTEIP=202.36.33.20
# Send one packet and listen for a response
ping $REMOTEIP -c 1 &> /dev/null
# Check the return value of ping 0=success, 1=fail
if [[ $? = 0 ]]; then
#link is up so turn it off
poff;
else
#link is down so turn it on
pon;
fi
More information about the wellylug
mailing list