Solved

how can a program tell if ppp-on succeeded

Posted on 1998-10-13
2
226 Views
Last Modified: 2010-03-18
I'm using Redhat 5.1.
I have pppd working correctly.

I'm writing a program that starts up a ppp link via the /etc/ppp/ppp-on script file.

The program needs to open up a socket with the remote computer after the ppp link is established.

Does anyone know of a "good" way to determine if the ppp-on script succeeded in establishing a ppp link?

Do I use the connect-errors file?
Do I use the ip-up.local and ip-down.local files?
How long do I wait to determine a failure?
0
Comment
Question by:mag062397
2 Comments
 
LVL 1

Accepted Solution

by:
ghjm earned 50 total points
ID: 1587170
The ip-up and ip-down scripts are the official way to do this, and should work well. However, they do not provide a way (that I know of) to run a script on connection failure. If this is important, the approach I would use is to hack out a shell script that waits until either ip-up gets run (by looking for the presence or absence of a flag file, perhaps), or until the ppp-on script no longer appears in ps ax. I would tend not to use a fixed timeout interval, because you really never know if pppd is still trying or has failed. But you can be sure that it's failed if it exits.
0
 

Author Comment

by:mag062397
ID: 1587171
Thanks I really just wanted a second opion.  I'm using "/bin/touch PPP.UP" and "/bin/rm PPP.UP" in ip-up.local and ip-down.local.  I then check for this flag file.

Thanks again.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question