Re: Get list of ethernet devices

看板FB_questions作者時間14年前 (2011/11/07 11:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/6 (看更多)
On Mon, 07 Nov 2011 01:46:14 +0100, Michael Ross wrote: > 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. You could look at how FreeSBIE does it - it contains "autodetect magic" also for graphics and sound. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1Ejqdl_e (FB_questions)
文章代碼(AID): #1Ejqdl_e (FB_questions)