Date: Mon, 23 Jul 2007 14:56:27 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-mobile@freebsd.org Cc: Henrik Brix Andersen <henrik@brixandersen.dk> Subject: Re: wpa_supplicant && and no ctrl_interface for wpa_cli Message-ID: <200707231456.27314.jhb@freebsd.org> In-Reply-To: <20070718201254.GA93437@tirith.brixandersen.dk> References: <20070718181039.GA1845@rebelion.Sisis.de> <20070718201254.GA93437@tirith.brixandersen.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 18 July 2007 04:12:55 pm Henrik Brix Andersen wrote: > On Wed, Jul 18, 2007 at 08:10:39PM +0200, Matthias Apitz wrote: > > and all is fine with WEP and WPA-PSK in the different Wifi locations > > which I have configured in /etc/wpa_supplicant.conf; but the configured > > UNIX domain socket files for communication in > > > > ctrl_interface=/var/run/wpa_supplicant > > > > will only be created if I start wpa_supplicant later manually again; > > I have checked the boot messages, but wpa_supplicant is started after > > local file systems are mounted and no errors are there; > > This is due to /etc/rc.d/cleanvar purging the /var/run/wpa_supplicant > directory after /etc/rc.d/wpa_supplicant is started. > > Here is a crude patch which makes cleanvar skip the wpa_supplicant > dir. I am not sure what the best solution is... > > > --- etc/rc.d/cleanvar.orig 2007-07-18 22:06:41.000000000 +0200 > +++ etc/rc.d/cleanvar 2007-07-18 22:08:02.000000000 +0200 > @@ -28,19 +28,26 @@ purgedir() > for dir > do > ( > - cd "$dir" && for file in .* * > - do > - # Skip over logging sockets > - [ -S "$file" -a "$file" = "log" ] && continue > - [ -S "$file" -a "$file" = "logpriv" ] && continue > - [ ."$file" = .. -o ."$file" = ... ] && continue > - if [ -d "$file" -a ! -L "$file" ] > - then > - purgedir "$file" > - else > - rm -f -- "$file" > - fi > - done > + case "$dir" in > + wpa_supplicant) > + # Skip > + ;; > + *) > + cd "$dir" && for file in .* * > + do > + # Skip over logging sockets > + [ -S "$file" -a "$file" = "log" ] && continue > + [ -S "$file" -a "$file" = "logpriv" ] && continue > + [ ."$file" = .. -o ."$file" = ... ] && continue > + if [ -d "$file" -a ! -L "$file" ] > + then > + purgedir "$file" > + else > + rm -f -- "$file" > + fi > + done > + ;; > + esac > ) > done > fi 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. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707231456.27314.jhb>