From owner-cvs-src@FreeBSD.ORG Tue Jun 7 22:50:13 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9B6216A41C; Tue, 7 Jun 2005 22:50:13 +0000 (GMT) (envelope-from andrea@brian3.inet.it) Received: from brian3.inet.it (brian3.inet.it [213.92.1.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5852F43D55; Tue, 7 Jun 2005 22:50:13 +0000 (GMT) (envelope-from andrea@brian3.inet.it) Received: by brian3.inet.it (Postfix, from userid 501) id 3412B202C0C; Wed, 8 Jun 2005 00:47:52 +0200 (CEST) Date: Wed, 8 Jun 2005 00:47:52 +0200 From: Andrea Campi To: Brooks Davis Message-ID: <20050607224745.GA4847@webcom.it> References: <200506070449.j574nCXU061621@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200506070449.j574nCXU061621@repoman.freebsd.org> User-Agent: Mutt/1.5.6i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc devd.conf network.subr pccard_ether src/etc/defaults rc.conf src/etc/rc.d dhclient netif X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2005 22:50:13 -0000 Hi, On Tue, Jun 07, 2005 at 04:49:12AM +0000, Brooks Davis wrote: > brooks 2005-06-07 04:49:12 UTC > > FreeBSD src repository > > Modified files: > etc devd.conf network.subr pccard_ether > etc/defaults rc.conf > etc/rc.d dhclient netif > Log: > Support code for the OpenBSD dhclient. This significantly changes the > way interfaces are configured. Some key points: things broke badly for me on a plain-vanilla installation. I don't have an easy way to test a proper solution right now, but there are a couple things that stick out as suspiciously bogus: > =================================================================== > RCS file: /usr/local/www/cvsroot/FreeBSD/src/etc/network.subr,v > retrieving revision 1.160 > retrieving revision 1.161 > diff -u -p -r1.160 -r1.161 > --- src/etc/network.subr 2004/12/05 21:45:36 1.160 > +++ src/etc/network.subr 2005/06/07 04:49:11 1.161 > @@ -34,16 +34,30 @@ > # Evaluate ifconfig(8) arguments for interface $if and > # run ifconfig(8) with those arguments. It returns 0 if > # arguments were found and executed or 1 if the interface > -# had no arguments. > +# had no arguments. Pseudo arguments DHCP and WPA are handled > +# here. > # > ifconfig_up() > { > - eval ifconfig_args=\$ifconfig_$1 > + _cfg=1 > + > + ifconfig_args=`ifconfig_getargs $1` > if [ -n "${ifconfig_args}" ]; then > ifconfig $1 ${ifconfig_args} > - return 0 > + _cfg=0 > fi > - return 1 > + > + if wpaif $1; then > + #/etc/rc.d/wpa_supplicant start $1 > + _cfg=0 # XXX: not sure this should count > + fi > + > + if dhcpif $1; then > + /etc/rc.d/dhclient start $1 > + _cfg=0 > + fi > + > + return ${cfg} Shouldn't this be $_cfg ? > @@ -74,7 +88,96 @@ ifconfig_down() > done > IFS="$oldifs" > > + if wpaif $1; then > + #/etc/rc.d/wpa_supplicant stop $1 > + fi > + > + if dhcpif $1; then > + /etc/rc.d/dhclient stop $1 > + _cfg=0 > + fi > + > return $_ret > +} Ditto. Bye, Andrea -- ...and that is how we know the Earth to be banana-shaped.