?
Solved

how can a program tell if ppp-on succeeded

Posted on 1998-10-13
2
Medium Priority
?
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
ghjm earned 200 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 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