Re: wpa_supplicant && and no ctrl_interface for wpa_cli

John Baldwin <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.