[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#247178: Only do automatic DHCP when a link exists

Package: netcfg
Severity: wishlist

Using mii-diag -s <device> you can find out whether the device is
actually connected... if if returns 2 (no link), automatic DHCP should
not even be tried.

----- Forwarded message from Herbert Xu <herbert@gondor.apana.org.au> -----

From: Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: detecting if eth0 is connected
Date: Mon, 3 May 2004 12:04:39 +1000
To: Martin Michlmayr <tbm@cyrius.com>
User-Agent: Mutt/
X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham 

On Mon, May 03, 2004 at 01:15:00AM +0100, Martin Michlmayr wrote:
> d-i runs DHCP automatically to see if it can obtain an IP address...
> now this really doesn't make much sense if your network card is not
> even connected to a network.  Do you know if it's possible to find out
> from user land whether ethX has a link?

For the drivers that have the proper support for this (that's most drivers
in 2.6, and probably slightly less in 2.4), you can look at the RUNNING
flag on the device (ifconfig), or use mii-tool.  The latter is better
supported under 2.4.
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

----- End forwarded message -----

Martin Michlmayr

Reply to: