[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ppp



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

On 6 Mar 00, at 5:37, Andrew Basterfield wrote:

> I have a shell script which connects me to the internet with ppp. Also in
> this script I would like to add fetchmail, sendmail -q, and rdate but
> because pppd detaches so quickly it tries to execute these commands before
> it has finished dialling/authenticating. Is there an easy & neat way to make
> it wait until the link is established?
> 

Rob S.
Vickers (Laboratories) Ltd.
Grangefield Industrial Estate, Pudsey, Leeds LS28 6QW
Switchboard: +44 (0)113 236 2811   Fax: +44 (0)113 236 2703

All opinions are my own and ! Vickers.
The nice thing about Windows is that it doesn't just crash.
It displays a dialogue box and lets you click OK first.
---------------------------------------------------------------------
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.