Gentoo Archives: gentoo-laptop

From: Henrik Brix Andersen <brix@g.o>
To: gentoo-laptop@l.g.o
Subject: Re: [gentoo-laptop] Abort network startup when cable not connected
Date: Wed, 18 May 2005 09:30:00
Message-Id: 1116408602.5226.3.camel@sponge.fungus
In Reply to: [gentoo-laptop] Abort network startup when cable not connected by Zander Z365
On Tue, 2005-05-17 at 18:12 -0400, Zander Z365 wrote:
> How can I configure the startup script so that networking will not be > started if the cable is not connected?
I have the following preup() function in my /etc/conf.d/net file: preup() { case ${IFACE} in eth0) ebegin "Checking link on ${IFACE}" mii-tool ${IFACE} 2> /dev/null | grep -q 'link ok' eend $? ;; *) ;; esac } Note: this is for use with baselayout-1.11.x. Sincerely, Brix -- Henrik Brix Andersen <brix@g.o> Gentoo Linux


File name MIME type
signature.asc application/pgp-signature