Solved

how can a program tell if ppp-on succeeded

Posted on 1998-10-13
2
196 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

912 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now