--- network 2009-03-10 14:04:12.000000000 -0700 +++ /etc/rc.d/network 2009-03-19 09:38:12.000000000 -0700 @@ -19,7 +19,7 @@ return 1 fi - wi_up $1 || return 1 + wi_up $1 eval ifcfg="\$${1}" if [ "$ifcfg" = "dhcp" ]; then @@ -30,7 +30,11 @@ else /sbin/ifconfig $ifcfg fi - return $? + ret_code=$? + + wi_status $1 || return 1 + + return $ret_code } wi_up() @@ -42,6 +46,10 @@ [[ -z "$WIRELESS_TIMEOUT" ]] && WIRELESS_TIMEOUT=2 sleep $WIRELESS_TIMEOUT +} + +wi_status() +{ bssid=`iwgetid $1 -ra` if [[ "$bssid" = "00:00:00:00:00:00" ]]; then printhl "Could not associate $1 - try increasing WIRELESS_TIMEOUT and check network is WEP or has no security"