[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ppp
----- Original Message -----
From: zzzz <zzzz [at] zapata.freeserve.co.uk>
To: <sheflug [at] vuw.ac.nz>
Sent: Monday, March 06, 2000 9:54 AM
Subject: Re: ppp
> Robert Speed wrote:
> >
> > It's a bit of a clumsy hack, but you could try greping ifconfig and
> > looking for the ppp0 connection.
> > Then when it's established, run sendmail -q, etc.
> > Sort of something like;
> >
> > WaitLoop=10
> > while test $WaitLoop -ne 0 ; do
> > WaitLoop=$[$WaitLoop-1]
> > LineUp=`ifconfig |grep "ppp0" |grep -c "158.152.1.222"`
> > if test $LineUp = "1"
> > then
> > WaitLoop=0
> > else
> > sleep 5
> > fi
> > done
> >
> > HTH
>
> I like this one better; it returns the IP address of the ppp0
> interface, and exits when ppp0 is not up (handy for ipchains scripts):
>
> DEV=ppp0
> IP=`ifconfig $DEV | grep "inet addr:" | \
> awk -F: {'print $2'} | cut -d\ -f 1`
> if [ -z "${IP}" ]; then
> exit 1
> fi
>
> Jules
Should have done a bit of research before coming to ShefLUG for help...
after pppd has initialised it executes /etc/ppp/ip-up if it exists so I just
created it and put my sendmail -q, fetchmail & rdate in there. Now
everything is hunkydory.
thanks
--
Andrew Basterfield
MEng Electronic & Communication Engineering Undergraduate
The University of Sheffield, England
Tel. 0114 222 9999 ex. 53198
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.
- References:
- Re: ppp
- From: "Robert Speed" <RobS [at] Viclabs.co.uk>
- Re: ppp
- From: zzzz <zzzz [at] zapata.freeserve.co.uk>