From owner-freebsd-mobile@FreeBSD.ORG Mon Jul 23 18:56:49 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 7E59416A417 for ; Mon, 23 Jul 2007 18:56:49 +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 3DB6D13C459 for ; Mon, 23 Jul 2007 18:56:49 +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 198493631 for multiple; Mon, 23 Jul 2007 15:05:15 -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 l6NIuVpE001661; Mon, 23 Jul 2007 14:56:31 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-mobile@freebsd.org Date: Mon, 23 Jul 2007 14:56:27 -0400 User-Agent: KMail/1.9.6 References: <20070718181039.GA1845@rebelion.Sisis.de> <20070718201254.GA93437@tirith.brixandersen.dk> In-Reply-To: <20070718201254.GA93437@tirith.brixandersen.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707231456.27314.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]); Mon, 23 Jul 2007 14:56:32 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3743/Mon Jul 23 13:44:24 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: 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: Mon, 23 Jul 2007 18:56:49 -0000 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