Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2007 22:12:55 +0200
From:      Henrik Brix Andersen <henrik@brixandersen.dk>
To:        freebsd-mobile@freebsd.org
Subject:   Re: wpa_supplicant && and no ctrl_interface for wpa_cli
Message-ID:  <20070718201254.GA93437@tirith.brixandersen.dk>
In-Reply-To: <20070718181039.GA1845@rebelion.Sisis.de>
References:  <20070718181039.GA1845@rebelion.Sisis.de>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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@brixandersen.dk>

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
Comment: GnuPG signed

iD8DBQFGnnRGv+Q4flTiePgRApDEAKCtFQnG8mQA3SrBW18DuYuCMYbU2QCeJfR5
nsqs4yrH45IyrBLYSC2I688=
=J0iE
-----END PGP SIGNATURE-----

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