Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to check if the network is up?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Pyke
n00b
n00b


Joined: 19 Jun 2002
Posts: 11

PostPosted: Thu Jul 04, 2002 6:52 pm    Post subject: How to check if the network is up? Reply with quote

I want to make a script which can bring up my internet connection if it is down and vice versa. Is there some command which will tell me whether the connection is up or not? I'm connected via a cablemodem and dhcp on eth0.

/Pyke
Back to top
View user's profile Send private message
Scandium
Retired Dev
Retired Dev


Joined: 22 Apr 2002
Posts: 340
Location: Germany

PostPosted: Thu Jul 04, 2002 9:59 pm    Post subject: Reply with quote

well, you could just see in ifconfig wether eth0 is up and running or not ?
Back to top
View user's profile Send private message
Pyke
n00b
n00b


Joined: 19 Jun 2002
Posts: 11

PostPosted: Fri Jul 05, 2002 8:49 am    Post subject: Reply with quote

Thanks! It was exactly this kind of thing I wanted to do. I hadn't thought of using ping - I had only come up with checking the eth0 inet addr part of ifconfig but found it a bit "ugly".

/pyke
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum