LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-03-2007, 04:44 PM   #1
jevin
LQ Newbie
 
Registered: Apr 2007
Location: Arouca, Trinidad
Distribution: Fedora core 6/Ubuntu
Posts: 14

Rep: Reputation: 0
Question Running a script if eth0 is up


I need to find out how to run a script when eth0 is up [starts up]. i found a tutorial that explains exactly what i want to do and how to do it, but that would only work for ubuntu/debian machines. I'd like to find out how to do this for fedora.

fedora has a set of script files located at: /etc/sysconfig/network-scripts/ but i'm not sure which one i have to edit to "run a script at NIC startup" or where i should put the script execution line.

Any help would be appreciated. Thanks.
 
Old 04-04-2007, 09:06 AM   #2
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
add command in /etc/rc.local
 
Old 04-04-2007, 09:19 AM   #3
jevin
LQ Newbie
 
Registered: Apr 2007
Location: Arouca, Trinidad
Distribution: Fedora core 6/Ubuntu
Posts: 14

Original Poster
Rep: Reputation: 0
correct me if i'm wrong: i think that would run the script at system startup.

But i want the script to run every time eth0 comes up [whether it's at system startup or if the system is already running, but the network went down and came back up].
 
Old 04-04-2007, 09:31 AM   #4
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
look at network-functions in /etc/sysconfig/network-scripts
maybe u can figure out something , dont forget to backup if u edit

but i am not be able to help u on the editing ( im not sys programer
 
  


Reply



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
i get an error message running php script inside a cgi script. repolona Linux - Software 0 02-22-2007 09:10 PM
How can I tell if a particular service (eth0) is running or not? donJulio Slackware 4 09-21-2005 01:37 AM
eth0 disconnected / not running kevinatkins Ubuntu 0 06-06-2005 04:51 PM
eth0 interface is not running! JatCo Linux - Networking 1 03-11-2004 01:00 PM
eth0 not running ifconfig calderonr Linux - Networking 1 01-16-2004 01:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:10 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