From owner-freebsd-mobile@FreeBSD.ORG Tue Jul 24 16:36:15 2007 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644CF16A421 for ; Tue, 24 Jul 2007 16:36:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 2651F13C46B for ; Tue, 24 Jul 2007 16:36:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.7b8) with ESMTP id 198688600 for multiple; Tue, 24 Jul 2007 12:44:54 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l6OGa6iO010357; Tue, 24 Jul 2007 12:36:08 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Doug Barton Date: Tue, 24 Jul 2007 11:49:30 -0400 User-Agent: KMail/1.9.6 References: <20070718181039.GA1845@rebelion.Sisis.de> <200707231727.18986.jhb@freebsd.org> <46A596B3.1080506@FreeBSD.org> In-Reply-To: <46A596B3.1080506@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707241149.30767.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 24 Jul 2007 12:36:09 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3754/Tue Jul 24 09:41:21 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-mobile@freebsd.org, Henrik Brix Andersen Subject: Re: wpa_supplicant && and no ctrl_interface for wpa_cli X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 16:36:15 -0000 On Tuesday 24 July 2007 02:05:39 am Doug Barton wrote: > John Baldwin wrote: > > On Monday 23 July 2007 05:00:06 pm Henrik Brix Andersen wrote: > >> On Mon, Jul 23, 2007 at 02:56:27PM -0400, John Baldwin wrote: > >>> Are you sure? In my output of rcorder, cleanvar gets run before netif > > (which > >>> is what kicks off wpa_supplicant). Also, when I looked, other files > >>> under /var/run that should have been toasted if cleanvar was running after > >>> netif were still present. > >> Yes, I am sure - I tested the patch before shipping it. If you add a > >> debug 'echo' to cleanvar you can see that it removes the > >> wpa_supplicant/* files after wpa_supplicant has run. > > > > Grrr, the problem is that cleanvar is running at the wrong time then. A real > > fix is to figure out that ordering problem. > > > > Henrix, can you please copy /etc/rc to its own directory, and apply > the attached patch to it? Then please do the following: > > rcorder -s nostart /etc/rc.d/* > rcorder.log 2>&1 > > Then run the patched rc, and either send me the 4 (total) files, or > post the results here. I debugged this further and found some interesting results. If I run rcorder on just /etc/rc.d/* cleanvar gets scheduled after var, but if I run rcorder on /etc/rc.d/* and my scripts in /usr/local/etc/rc.d, I get a different order and cleanvar is just before pflog (which REQUIREs cleanvar). Making 'netif' REQUIRE cleanvar does seem to fix this, but having rcorder give different lists is troubling considering we invoke it twice. Would hate to skip a script and/or run one twice because it moved before or after $early_divider. In my case it seems that no scripts prior to $early_divider were affected. You can find my rcorder outputs at http://www.FreeBSD.org/~jhb/rcfun/ 'one' is 'rcorder -s nostart /etc/rc.d/*' before I patched netif 'two' is 'rcorder -s nostart /etc/rc.d/* /usr/local/etc/rc.d/' before I patched netif (where are all the rcNG style scripts) 'three' is 'rcorder -s nostart /etc/rc.d/* /usr/local/etc/rc.d/' after I patched netif. Patch to netif: Index: netif =================================================================== RCS file: /usr/cvs/src/etc/rc.d/netif,v retrieving revision 1.22 diff -u -r1.22 netif --- netif 9 Feb 2007 12:11:26 -0000 1.22 +++ netif 24 Jul 2007 11:59:40 -0000 @@ -26,7 +26,7 @@ # # PROVIDE: netif -# REQUIRE: atm1 ipfilter mountcritlocal serial sppp sysctl +# REQUIRE: atm1 cleanvar ipfilter mountcritlocal serial sppp sysctl # KEYWORD: nojail . /etc/rc.subr -- John Baldwin