Solved

how can a program tell if ppp-on succeeded

Posted on 1998-10-13
2
182 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 Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Running Guacamole on port 80 5 103
SIP Trunk provider 20 93
Vmware tools installation in ubuntu 14.04 11 89
iptables ubuntu BLOCK all 2 75
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 tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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