Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 2010 09:18:42 +0200
From:      Bernhard Schmidt <bschmidt@techwires.net>
To:        Dominic Fandrey <kamikaze@bsdforen.de>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: wpa_supplicant does not create pidfile
Message-ID:  <201009070918.42959.bschmidt@techwires.net>
In-Reply-To: <4C85E638.4070403@bsdforen.de>
References:  <4C716382.3040605@bsdforen.de> <201009070909.26304.bschmidt@techwires.net> <4C85E638.4070403@bsdforen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, September 07, 2010 09:14:00 Dominic Fandrey wrote:
> On 07/09/2010 09:09, Bernhard Schmidt wrote:
> > On Tuesday, September 07, 2010 09:01:18 Dominic Fandrey wrote:
> >> On 07/09/2010 08:50, Bernhard Schmidt wrote:
> >>> On Friday, August 27, 2010 09:42:30 Bernhard Schmidt wrote:
> >>>> On Fri, Aug 27, 2010 at 09:36, Dominic Fandrey <kamikaze@bsdforen.de>
> > 
> > wrote:
> >>>>> On 27/08/2010 09:28, Bernhard Schmidt wrote:
> >>>>>> On Sun, Aug 22, 2010 at 19:50, Dominic Fandrey
> >>>>>> <kamikaze@bsdforen.de>
> >>> 
> >>> wrote:
> >>>>>>> wpa_supplicant doesn't create the pidfile if the target directory
> >>>>>>> does not exist. Because /var/run is wiped with every boot I added
> >>>>>>> the following line to my rc.local to workaround this issue:
> >>>>>>> 
> >>>>>>> /bin/mkdir -p /var/run/wpa_supplicant
> >>>>>>> 
> >>>>>>> I'm running RELENG_8.
> >>>>>> 
> >>>>>> How about this?
> >>>>>> 
> >>>>>> Index: etc/mtree/BSD.var.dist
> >>>>>> ===================================================================
> >>>>>> --- etc/mtree/BSD.var.dist>.....(revision 211568)
> >>>>>> +++ etc/mtree/BSD.var.dist>.....(working copy)
> >>>>>> @@ -64,6 +64,8 @@
> >>>>>> 
> >>>>>>          ..
> >>>>>>          ppp             gname=network mode=0770
> >>>>>>          ..
> >>>>>> 
> >>>>>> +        wpa_supplicant
> >>>>>> +        ..
> >>>>>> 
> >>>>>>      ..
> >>>>>>      rwho            gname=daemon mode=0775
> >>>>>>      ..
> >>>>> 
> >>>>> Is the mtree built every time the system boots? Because my /var/run
> >>>>> is a tmpfs. And even if it wasn't, I think it's wiped every boot
> >>>>> any way.
> >>>> 
> >>>> Not build but, according to /etc/rc.d/var mtree is run on every boot.
> >>>> I actually tried that and it works just fine.
> >>> 
> >>> Did you have a chance to try this? Given positive feedback I'd like to
> >>> commit it.
> >> 
> >> No, doesn't work. The named and ppp directories also don't exist.
> >> 
> >> Sorry about the delay.
> > 
> > Ok, thanks.
> > 
> > Is it only /var/run/* that is wiped for you, or /var/* itself? I just
> > checked
> > 
> > rc.d/var and it looks like this:
> >     if [ -d /var/run -a -d /var/db -a -d /var/empty ] ; then
> >     
> >         true
> >     
> >     elif [ -x /usr/sbin/mtree ] ; then
> >     
> >         populate_var
> > 
> > So.. if var/run does exist, populate_var isn't run.
> 
> Only /var/run and /var/log are tmpfs (notebook, reduce HD access
> to allow HD spindown). I wouldn't wipe my /var/db every boot.

Ah, ok, that explains it. Try with populate_var=YES in rc.conf and it should 
create all directories under var/run.

-- 
Bernhard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009070918.42959.bschmidt>