LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-23-2004, 07:55 PM   #1
rohan208
Member
 
Registered: May 2004
Posts: 75

Rep: Reputation: 15
how to auto detect when connected to internet?


Hey,
I'd like to perform certain task when i get connected to internet. For instance the way MSN behaves. As soon as we connect to internet via eth0 or ppp0, MSN messanger automatically starts..
Is there any way to run a script when i get connected to the internet via PPP? for instance is there some sort of interrupt generated when we are connected?

Rohan
 
Old 07-23-2004, 09:54 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi Rohan,
When pppd starts, it start a script named "/etc/ppp/ip-up". When it stops, it start another script, named "/etc/ppp/ip-down".
These scripts are for this purpose. In the RH heritage, both scripts will call another pair of scripts named "/etc/ppp/ip-up.local" and "/etc/ppp/ip-down.local". You are free to add your commands where you find appropriate. If you need some environment information as to what serial port, what connection, etc, read "man pppd", as there it specifies the parameters which are passed to the scripts at startup.
 
Old 07-24-2004, 04:00 PM   #3
rohan208
Member
 
Registered: May 2004
Posts: 75

Original Poster
Rep: Reputation: 15
thanks a lot osvaldomarques..
I shall try it out.
Thanks again.
Rohan
 
  


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
Fedora Core 4 Auto Detect? lovetto Linux - Networking 2 09-02-2005 06:22 PM
linux won't detect hd connected through RAID abbasakhtar Linux - Hardware 1 12-26-2004 01:55 PM
X Windows Auto-detect Brother Michael Debian 3 05-13-2004 11:53 AM
Mandrake 8.1 Internet Auto-detect kleinella Linux - Newbie 1 12-30-2001 11:07 PM
CD-ROM drives don't auto-detect (sometimes) justin19fl General 2 07-29-2001 09:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:34 AM.

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