Solved

how can a program tell if ppp-on succeeded

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

790 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