View previous topic :: View next topic |
Author |
Message |
Pyke n00b
Joined: 19 Jun 2002 Posts: 11
|
Posted: Thu Jul 04, 2002 6:52 pm Post subject: How to check if the network is up? |
|
|
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 |
|
|
Scandium Retired Dev
Joined: 22 Apr 2002 Posts: 340 Location: Germany
|
Posted: Thu Jul 04, 2002 9:59 pm Post subject: |
|
|
well, you could just see in ifconfig wether eth0 is up and running or not ? |
|
Back to top |
|
|
Pyke n00b
Joined: 19 Jun 2002 Posts: 11
|
Posted: Fri Jul 05, 2002 8:49 am Post subject: |
|
|
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 |
|
|
|