On Mon, Nov 05, 2001 at 07:53:05PM +0100, Fredrik Jagenheim wrote: > How do I make eth0 configure itself automatically whenever a network > cable is inserted? Or otherwise configure the network at the request > of a user?
[snip] I have a similar situation. I use mii-tool (only works for 100Mbps cards, although there are other tools for various 10Mbps cards,) to check whether or not a link is present on boot, and bring the interface up or not based on that. I put these commands in /etc/network/interfaces, under the pre-up section for eth0 (man interfaces will provide more information of the specifics of the file). Now, when eth0 comes up at boot, if 'mii-tool | grep "link ok"' fails, the interfaces stays deconfigured. I suppose you could also set up a cron job that periodically checks the connection and brings the interface up or down based on that. HTH, -- Mike Alborn <[EMAIL PROTECTED]> # pgp keyid: C36DC30D # ICQ UIN #10316342 "The hottest places in Hell are reserved for those who, in times of moral crisis, preserved their neutrality." -- Dante
pgpgAQ48WTYMK.pgp
Description: PGP signature