wpa_supplicant && and no ctrl_interface for wpa_cli

John Baldwin jhb at freebsd.org
Tue Jul 24 16:36:15 UTC 2007


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/<mumble>' before 
I patched netif (where <mumble> are all the rcNG style scripts)
'three' is 'rcorder -s nostart /etc/rc.d/* /usr/local/etc/rc.d/<mumble>' 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


More information about the freebsd-mobile mailing list