/[baselayout]/branches/baselayout-1_12/net-scripts/net.modules.d/iwconfig
Gentoo

Diff of /branches/baselayout-1_12/net-scripts/net.modules.d/iwconfig

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1797 Revision 1798
242# bool iwconfig_associate_mac(char *iface) 242# bool iwconfig_associate_mac(char *iface)
243# 243#
244# Returns true if the AP MAC address is valid or not 244# Returns true if the AP MAC address is valid or not
245iwconfig_associate_mac() { 245iwconfig_associate_mac() {
246 # Checks if a MAC address has been assigned 246 # Checks if a MAC address has been assigned
247 local mac=$( iwconfig_get_ap_mac_address "$1" ) i 247 local mac="$( iwconfig_get_ap_mac_address $1 )" i
248 local -a invalid_macs=( 248 local -a invalid_macs=(
249 "00:00:00:00:00:00" 249 "00:00:00:00:00:00"
250 "44:44:44:44:44:44" 250 "44:44:44:44:44:44"
251 "FF:00:00:00:00:00" 251 "FF:00:00:00:00:00"
252 "FF:FF:FF:FF:FF:FF" 252 "FF:FF:FF:FF:FF:FF"
338 unset ESSIDVAR 338 unset ESSIDVAR
339 else 339 else
340 ESSIDVAR=$( bash_variable "${ESSID}" ) 340 ESSIDVAR=$( bash_variable "${ESSID}" )
341 key=$( iwconfig_get_wep_key "${mac}" ) 341 key=$( iwconfig_get_wep_key "${mac}" )
342 if [[ ${wep_required} == "on" && ${key} == "off" ]]; then 342 if [[ ${wep_required} == "on" && ${key} == "off" ]]; then
343 ewarn "WEP key is not set for \"${dessid}\"" 343 eerror "WEP key is not set for \"${dessid}\" - not connecting"
344 return 1
344 fi 345 fi
345 if [[ ${wep_required} == "off" && ${key} != "off" ]]; then 346 if [[ ${wep_required} == "off" && ${key} != "off" ]]; then
346 key="off" 347 key="off"
347 ewarn "\"${dessid}\" is not WEP enabled - ignoring setting" 348 ewarn "\"${dessid}\" is not WEP enabled - ignoring setting"
348 fi 349 fi
427 ewarn " ${!x}" 428 ewarn " ${!x}"
428 fi 429 fi
429 fi 430 fi
430 431
431 # Set the essid to any. This is required for scanning 432 # Set the essid to any. This is required for scanning
432 iwconfig "${iface}" essid any 433 #iwconfig "${iface}" essid any
433 434
434 veinfo "Scanning for access points" 435 veinfo "Scanning for access points"
435 436
436 # Sleep if required 437 # Sleep if required
437 x="sleep_scan_${ifvar}" 438 x="sleep_scan_${ifvar}"

Legend:
Removed from v.1797  
changed lines
  Added in v.1798

  ViewVC Help
Powered by ViewVC 1.1.20