On Sun, Apr 17, 2011 at 11:13 AM, Sedat Dilek
<[email protected]> wrote:
> On Sun, Apr 17, 2011 at 10:29 AM, Sedat Dilek
> <[email protected]> wrote:
>> On Fri, Apr 15, 2011 at 1:17 PM, Kel Modderman <[email protected]> wrote:
>>> On Thu, 14 Apr 2011 10:50:30 PM Sedat Dilek wrote:
>>>> Package: wpasupplicant
>>>> Version: 0.7.3-2
>>>> Severity: normal
>>>>
>>>> Hi,
>>>>
>>>> with wpasupplicant-0.7.3 entering Debian/sid my Internet connection is
>>>> not established anymore.
>>>>
>>>> By replacing the ifupdown/functions.sh script from wpasupplicant
>>>> (0.6.10-2.1) things are as used to.
>>>> I haven't got the time to look deeper into this as it WorksForMe.
>>>>
>>>> I have collected all relevant material (/e/n/i), the files of
>>>> ifupdown-dirs from 0.6.10 and 0.7.3 (see also the diffs) and added my
>>>> dsc|diff files into the attached tarball.
>>>>
>>>> If this kind of matters I use systemd as sysvinit replacement and
>>>> resolvconf helps for static-IP network setup.
>>>> Furthermore, I have no ifplugd or suggested libengine-pkcs11-openssl 
>>>> installed.
>>>>
>>>> If you have detailed instructions on how to investigate the issue,
>>>> please let me know.
>>>
>>> Without reviewing any diff, it could be related to #622589
>>>
>>> Kel.
>>>
>>
>> While playing with "IO-less dirty throttling v7" patcheset I did fall
>> in some few cases in a WLAN connection which was not setup at startup.
>>
>> I guess all trouble is due to fast parallelization (especially
>> systemd) and the non-existence of the socket-file.
>>
>> The relevant part (until - do -done ) was removed in functions.sh
>> while upgrade 0.6.x -> 0.7.x:
>> ...
>> -       until [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; do
>> -               if [ "$WPA_SOCKET_WAIT" -ge "$MAX_WPA_SOCKET_WAIT" ]; then
>> -                       wpa_msg stderr "ctrl_interface socket not
>> found at $WPA_CTRL_DIR/$WPA_IFACE"
>> -                       return 1
>> -               else
>> -                       wpa_msg verbose "waiting for
>> \"$WPA_CTRL_DIR/$WPA_IFACE\": " \
>> -                               "$WPA_SOCKET_WAIT (max. 
>> $MAX_WPA_SOCKET_WAIT)"
>> -               fi
>> -
>> -               WPA_SOCKET_WAIT=$(($WPA_SOCKET_WAIT + 1))
>> -               sleep 1
>> -       done
>> ...
>>
>> To summarize... all my efforts do not really work reliable at startup.
>> So, please fix this soon.
>>
>> Thanks in advance.
>>
>> - Sedat -
>>
>
> What about this fix?
> ( It works on startup and does not slow-down my boot-process with
> systemd (approx. 18sec). )
>
> - Sedat -
>
> --- 0.7.3/functions.sh  2010-05-02 10:41:33.000000000 +0200
> +++ functions.sh        2011-04-17 10:38:21.621261733 +0200
> @@ -279,10 +279,15 @@ init_wpa_supplicant () {
>                return 1
>        fi
>
> -       if [ -n "$WPA_SUP_OMIT_PIDFILE" ]; then
> -               wpa_msg verbose "creating sendsigs omission pidfile:
> $WPA_SUP_OMIT_PIDFILE"
> -               cat "$WPA_SUP_PIDFILE" > "$WPA_SUP_OMIT_PIDFILE"
> -       fi
> +       until [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; do
> +               if [ -n "$WPA_SUP_OMIT_PIDFILE" ]; then
> +                       wpa_msg verbose "creating sendsigs omission
> pidfile: $WPA_SUP_OMIT_PIDFILE"
> +                       cat "$WPA_SUP_PIDFILE" > "$WPA_SUP_OMIT_PIDFILE"
> +               else
> +                       wpa_msg stderr "$WPA_SUP_BIN daemon could not
> create sendsigs omission pidfile"
> +                       return 1
> +               fi
> +       done
>  }
>
>  #####################################################################
>
> - EOT -
>

Here a diff with adapted wpa_msg from 0.6.x-0.7.x diff and I added
debug-options with a comment.

Have fun!

- Sedat -
--- 0.7.3/functions.sh	2010-05-02 10:41:33.000000000 +0200
+++ functions.sh	2011-04-17 11:36:07.171501363 +0200
@@ -199,10 +199,15 @@ test_wpa_cli () {
 # -b	bridge interface name
 # -f	path to log file
 #
+# Debug options:
+# -d   Increase debugging verbosity (-dd even more).
+# -t   Include timestamp in debug messages.
+#
 init_wpa_supplicant () {
 	[ -n "$WPA_SUP_CONF" ] || return 0
 
 	local WPA_SUP_OPTIONS
+	# DEBUG: Add -ddt to run daemon in debug mode and include timestamp informations
 	WPA_SUP_OPTIONS="-s -B -P $WPA_SUP_PIDFILE -i $WPA_IFACE"
 
 	if [ -n "$WPA_ACTION_SCRIPT" ]; then
@@ -279,10 +284,16 @@ init_wpa_supplicant () {
 		return 1
 	fi
 
-	if [ -n "$WPA_SUP_OMIT_PIDFILE" ]; then
-		wpa_msg verbose "creating sendsigs omission pidfile: $WPA_SUP_OMIT_PIDFILE"
-		cat "$WPA_SUP_PIDFILE" > "$WPA_SUP_OMIT_PIDFILE"
-	fi
+	until [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; do
+		if [ -n "$WPA_SUP_OMIT_PIDFILE" ]; then
+			wpa_msg verbose "creating sendsigs omission pidfile: $WPA_SUP_OMIT_PIDFILE"
+			cat "$WPA_SUP_PIDFILE" > "$WPA_SUP_OMIT_PIDFILE"
+		else
+			wpa_msg verbose "sendsigs omission pidfile not created"
+			wpa_msg stderr "ctrl_interface socket not found at $WPA_CTRL_DIR/$WPA_IFACE"
+			return 1
+		fi
+	done
 }
 
 #####################################################################

Reply via email to