[vortex] detecting whether network cable is plugged in?

Roman Maeder web+linux@mathconsult.ch
Wed, 07 Mar 2001 20:38:44 +0100

back in the good old days, stationary PCs had PCI or other fixed ethernet
cards, and laptops had PCMCIA-based ethernet adaptors. With the
3Com PCI 3c556 Laptop Tornado and the 3c59x.c driver, linux
(in my case RedHat Wolverine beta release on a Dell Inspiron 4000) treats
the network connection through this card as basically permanent.
Even if no cable is plugged into it, the eth0 interface is brought up,
as if connected to a network.

I can manually bring it down and could possibly also play with different
boot arguments, but the card knows whether a cable is plugged in
(at least there is a check-box to this effect in the Windows ME driver
for it), and based on that information the network startup scripts could
decide to bring it up or not, much in the same way that it happens with
PCMCIA cards. Does the current driver support this functionality and
how would I use it in the startup scripts?

Any help is greatly appreciated.

Roman Maeder