Date: Tue, 23 Mar 2004 10:27:39 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: dan@langille.org Cc: mobile@freebsd.org Subject: Re: two NICs, one dhclient Message-ID: <20040323.102739.95902247.imp@bsdimp.com> In-Reply-To: <20040322182954.S90677@xeon.unixathome.org> References: <20040322182954.S90677@xeon.unixathome.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040322182954.S90677@xeon.unixathome.org> Dan Langille <dan@langille.org> writes: : My IBM ThinkPad T22 is running FreeBSD 5.2.1 and has a built-in NIC (fxp0) : and a PCMCIA wi0. : : I have 'ifconfig_fxp0="DHCP"' in /etc/rc.conf. What I'd like to do is : have dhclient run in wi0 if it is present and then not on fxp0. But if no : wi0, then run dhclient on fxp0. : : devd.conf was mentioned to me as one way to acheive this. Does anyone have : a working configuration? You'd need a replacement script for the /etc/pccard_ether script that the default devd.conf runs. You could do something like: case $1 in fxp0) maybe_dhclient fxp0;; wi0) dhclient wi0;; esac maybe_dhclient() { if ifconfig wi0 > /dev/null 2&>1; then exit fi dhclient $1 } Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040323.102739.95902247.imp>