On Thu, 15 Aug 2002 13:50:52 -0700
Mad Scientist [EMAIL PROTECTED] wrote:
On Thu, 15 Aug 2002, Randy Kramer wrote:
1. Anybody know a good way to detect that a network link is active?
The following will output a 1 to standard out if interface is up. I tested
with eth0 but I assume it will work with ppp0 as well.
ifconfig | grep interface -A 2 | grep -c UP
-Mad
--
Madness is soil in which creativity grows
- Chris Bielek
-A 3 works in more cases. for ex, if u have a line beginning with adr inet6.
eth0 Lien encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet adr:x.x.x.x Bcast:x.x.x.x Masque:x.x.x.x
adr inet6: ::xxx:::/xx Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
bye
jipe
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com