From owner-freebsd-stable@FreeBSD.ORG Mon Jan 21 16:44:10 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74B416A41A for ; Mon, 21 Jan 2008 16:44:10 +0000 (UTC) (envelope-from mh@kernel32.de) Received: from crivens.kernel32.de (crivens.terrorteam.de [81.169.171.191]) by mx1.freebsd.org (Postfix) with ESMTP id 752E613C447 for ; Mon, 21 Jan 2008 16:44:10 +0000 (UTC) (envelope-from mh@kernel32.de) Received: from www.terrorteam.de (localhost [127.0.0.1]) by crivens.kernel32.de (Postfix) with ESMTP id E3878B028E; Mon, 21 Jan 2008 17:44:08 +0100 (CET) MIME-Version: 1.0 Date: Mon, 21 Jan 2008 17:44:08 +0100 From: Marian Hettwer To: Kimi In-Reply-To: <42b497160801210838j13ea3fe0wf8bf69faa2467eae@mail.gmail.com> References: <42b497160801210838j13ea3fe0wf8bf69faa2467eae@mail.gmail.com> Message-ID: <373df47a949fa2917f85f8a2b1eec9aa@localhost> X-Sender: mh@kernel32.de User-Agent: RoundCube Webmail/0.1-rc2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: freebsd-stable@freebsd.org, Drew Weaver , Royce Williams Subject: Re: Manual/Wiki or other documentation for PXE install mainlyinstall.cfg? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2008 16:44:10 -0000 On Mon, 21 Jan 2008 16:38:32 +0000, Kimi wrote: > On 21/01/2008, Drew Weaver wrote: >> Would have been, or would be nice if they could make an alias to > 'the first Ethernet controller' (i.e. eth0). So that you could reference it > in such a way when there is only a single Ethernet controller in a machine. >> > > ifconfig fxp0 name eth0 ? > well, at this point he doesn't seem to know wether fxp0 is his first ethernet interface. Chicken Egg problem ;-) This is a snippet from OpenBSD's installer (it's a ksh script). Dunno wether it works on FreeBSD, though. But should :) # Find all ethernet interfaces A=`dmesg | grep 'address ..:..:..:..:..:..' | sed 's/^\(.*\) at .*/\1/'` # Find the first interface with cable plugged in for i in $A; do if ifconfig $i | grep 'status: active'; then IFACE=$i; export IFACE break fi done if test "$IFACE"; then echo Network interface is $IFACE else echo No network interface located. Aborting. exec sh fi The status: active part could be a way to figure out which interface is active... regards, Marian