Hi,
I've got a RH6.0 machine, that can remote dial-in to my ISP.
Every time the system connects, I want to perform some tasks that can
only be performed AFTER the system has succesfuly connected.
Currently, my dial-script looks something like this:
=====
#!/bin/bash
# Check if link is up
if [ -r /var/run/ppp0.pid ]; then
echo 'ERROR: Link is up!'
exit 1
fi
# Link is not up, dial to ISP
pppd /dev/ttyS0 115200 connect /etc/ppp/ISP-chat-script &
<perform some other tasks>
=====
However, the scripts continues after calling the pppd, and the other
tasks fail because of the fact the call has not been setup, no DNS is
available and no host is reachable.
How can I make the script wait until a connection has been setup (or,
wait just 20 seconds and continue as that would be OK for me too)???
Thanks!
--
Peter