Hi,
You can use something like this:
----------start-------------
/etc/suseppp/scripts/ppp-up generic
sleep 20 # wait 20 sec
ping -c 3 your.gateway.numeric.ip.here
if [ $? -ne 0 ]
then
echo "No connection established..."
exit 1
else
run the rest of your script here
fi
--------------end-----------------
On Thu, 18 Mar 1999, Steve Crane wrote:
>
> Hi All,
>
> I am running SuSE 5.3 and have become quite tired of using Netscape
> Communicator for e-mail. I am now using sendmail and fetchmail with
> mutt. I have created the following script:
>
> /etc/suseppp/scripts/ppp-up generic
> sendmail -q
> fetchmail -v >> /var/log/fetchmail
> /etc/suseppp/scripts/ppp-down
>
> to send and receive but it has a problem. The commands after the ppp-up
> execute immediately and the entire script finishes (with errors from
> sendmail & procmail) before the modem even begins to connect.
>
> How can I pause the script and test that the connection was made before
> continuing with execution?
>
> ---
> Steve Crane
> [EMAIL PROTECTED]
> http://www.datapro.co.za/~stevec
> --
> To get out of this list, please send email to [EMAIL PROTECTED] with
> this text in its body: unsubscribe suse-linux-e
> Check out the SuSE-FAQ at http://www.suse.com/Support/Doku/FAQ/ and the
> archive at http://www.suse.com/Mailinglists/suse-linux-e/index.html
>
--
To get out of this list, please send email to [EMAIL PROTECTED] with
this text in its body: unsubscribe suse-linux-e
Check out the SuSE-FAQ at http://www.suse.com/Support/Doku/FAQ/ and the
archive at http://www.suse.com/Mailinglists/suse-linux-e/index.html