Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2008 12:04:20 -0500
From:      Drew Weaver <drew.weaver@thenap.com>
To:        'Marian Hettwer' <mh@kernel32.de>, Kimi <kimimeister@gmail.com>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>, Royce Williams <royce@alaska.net>
Subject:   RE: Manual/Wiki or other documentation for PXE install mainlyinstall.cfg?
Message-ID:  <B7152C470C9BF3448ED33F16A75D81C14D261CB00A@exchanga.thenap.com>
In-Reply-To: <373df47a949fa2917f85f8a2b1eec9aa@localhost>
References:  <42b497160801210838j13ea3fe0wf8bf69faa2467eae@mail.gmail.com> <373df47a949fa2917f85f8a2b1eec9aa@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, 21 Jan 2008 16:38:32 +0000, Kimi <kimimeister@gmail.com> wrote:
> On 21/01/2008, Drew Weaver <drew.weaver@thenap.com> 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
---

Not specifically that I don’t know, more specifically that install.cfg doesn't know whether it’s a rl0, fxp0 or 3 or 4 others..

-Drew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B7152C470C9BF3448ED33F16A75D81C14D261CB00A>