wpa_supplicant && and no ctrl_interface for wpa_cli

Henrik Brix Andersen henrik at brixandersen.dk
Wed Jul 18 20:45:25 UTC 2007


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


-- 
Henrik Brix Andersen <henrik at brixandersen.dk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 209 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mobile/attachments/20070718/ae05db62/attachment.pgp


More information about the freebsd-mobile mailing list