From owner-freebsd-questions@FreeBSD.ORG Mon Nov 7 00:46:18 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 093221065676 for ; Mon, 7 Nov 2011 00:46:18 +0000 (UTC) (envelope-from michael.ross@gmx.net) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id 5B8698FC0C for ; Mon, 7 Nov 2011 00:46:17 +0000 (UTC) Received: (qmail invoked by alias); 07 Nov 2011 00:46:16 -0000 Received: from dslb-092-076-090-134.pools.arcor-ip.net (EHLO michael-think) [92.76.90.134] by mail.gmx.net (mp045) with SMTP; 07 Nov 2011 01:46:16 +0100 X-Authenticated: #11429267 X-Provags-ID: V01U2FsdGVkX1+VlkAvF7iVfrbx7oTECRSsuIl44FGBHcqR4jZhUV aNnBo5pM6AXNCw Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Date: Mon, 07 Nov 2011 01:46:14 +0100 To: "freebsd-questions@freebsd.org" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Michael Ross" Message-ID: User-Agent: Opera Mail/11.52 (Win32) X-Y-GMX-Trusted: 0 Subject: Get list of ethernet devices X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2011 00:46:18 -0000 Moin, I'm setting up a system on an external USB drive, serving as fallback in case of a server failure: Customer takes USB drive, plugs it into any of his PCs and boots of it. Now I am looking for a good method to configure the network: I could just start dhclient on any NIC which could possibly be there, thus cramming rc.conf with ifconfig_em0="DHCP" ifconfig_em1="DHCP" ifconfig_fxp0="DHCP" and so on. Or I could grep ifconfig or dmesg output for ethernet interfaces and dhclient these. Both sound like a very messy solution. So I would step beyond my current area of expertise, grep some source from sysinstall, bsdinstall or somewhere and do it in C. But I'm kind of hoping anybody can point me to a readymade solution yet unknown to me. Regards, Michael