LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2003, 05:27 PM   #1
ruchika
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Rep: Reputation: 0
PPP scripts


Hi,

I have a shell script that establishes a PPP connection. I have a ppp-on script that runs pppd and a ppp-on-dialer script that runs chat. I am getting confused here -

1) What processes should I look for to make sure that pppd and chat are running? I see /var/run/ppp0.pid sometimes, but sometimes its not there. There is also /var/run/pppd.tdb which doesn't go away irrespective of whether pppd is running or not. What is pppd.tdb file for?

2) What process corresponds to chat?

3) The ppp-on script starts ppp-on-dialer script. I run ppp-on script from my C function using system call. Using the following two lines, I can know the exit code of ppp-on.
int ret = system("./ppp-on")
printf("%d", WEXITSTATUS(ret));

But how can I know the return code of chat? This is how my chat script looks.

exec chat -v -s
ABORT 'RING'
ABORT 'NO CARRIER'
'' AT
TIMEOUT 3
OK ATD$TELEPHONE
TIMEOUT 45
CONNECT ''

4) Is there a way of specifying the number of times chat should try to establish connection before returning failure?

5) Should ppp-off script just try to kill ppp0.pid or also kill pppd.tdb?

Thanks for your help.

Ruchika
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link linux ppp client to windows ppp server? cyz Linux - Networking 2 12-11-2008 06:01 AM
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 01:10 PM
How to make ppp scripts run as user Grunty Slackware 6 09-13-2005 09:54 PM
Looking for man ppp-on and info ppp-on pages. rvijay Linux - General 1 02-26-2005 09:49 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 01:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration