--- /usr/bin/netcfg 2006-02-06 03:33:02.000000000 -0500 +++ ./netcfg 2006-03-10 14:37:10.000000000 -0500 @@ -101,7 +101,7 @@ # Re-read the profile (stop_profile might have overwritten our settings) unset DESCRIPTION INTERFACE IFOPTS - unset IWOPTS WIFI_INTERFACE WIFI_WAIT USEWPA WPAOPTS + unset IWOPTS WIFI_INTERFACE WIFI_WAIT USEWPA WPAOPTS WPA_WAIT unset GATEWAY HOSTNAME DOMAIN DNS1 DNS2 . $PROFILE_DIR/$1 @@ -118,15 +118,16 @@ ifconfig $WIFI_INTERFACE up wpa_supplicant -wB -i $WIFI_INTERFACE -c /etc/wpa_supplicant.conf $WPAOPTS # I donīt know how we could determine if wpa_supplicant is ready... - sleep 2 + [ -z "$WPA_WAIT" ] && WPA_WAIT=25 let i=0 + sleep 2 while ! wpa_cli status | grep "wpa_state=COMPLETED" >/dev/null 2>&1; do - if [ $i -gt 10 ]; then + sleep 1 + if [ $i -gt $WPA_WAIT ]; then wpa_cli terminate >/dev/null 2>&1 ifconfig $WIFI_INTERFACE down stat_fail && return fi - sleep 2 let i++ done fi --- /etc/network-profiles/template 2006-02-06 03:33:02.000000000 -0500 +++ ./template 2006-03-10 15:01:14.000000000 -0500 @@ -32,4 +32,5 @@ #WPAOPTS="" # use "" for normal operation or specify additional # options (eg, "-D ipw") # see /etc/wpa_supplicant.conf for configuration - +#WPA_WAIT=25 # Number of seconds to wait for wpa_supplicant to + # associate, default value is 25