LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-16-2011, 02:38 PM   #1
marc_x
LQ Newbie
 
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
How to detect if eth0 has been enabled properly on startup


Hi, building a box with no other interface than tcp/ip. now in case something goes wrong when changing the /etc/network/interfaces via ftp and when rebooting the system cannot bring the interface up I would like to be able to detect it and replace the interfaces file with a default one stored on the system. any clues appreciated
 
Old 03-16-2011, 02:47 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Well, the easiest way would be to add:

Code:
*/5 * * * * /root/go.sh
to your crontab, which will run every 5 minutes. If you aren't able to log in and disable it, it will run, copy over the new interfaces file and reboot.

Code:
[go.sh] script file should contain

/bin/cp /etc/network/interfaces.backup /etc/network/interfaces; reboot;
 
  


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
[SOLVED] OpenGL apps won't run in window mode properly (Compiz enabled) MrCode Linux - General 8 11-21-2009 03:14 AM
My mobile phone could not detect my bluetooth enabled PC? depam Linux - Hardware 2 10-01-2007 01:17 AM
How to detect an interface is DHCP enabled ? manishpatidar Linux - Networking 3 07-06-2006 06:15 PM
eth0 goes down with dhcp enabled maybbach Linux - Networking 4 04-04-2006 09:36 PM
How do I know that my swap is enabled and working properly? mouse46 Linux - Software 9 10-26-2004 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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