local scan_ssid="1"
[ -n "$4" ] && freq="frequency=$4"
- # make sure we have the encryption type and the psk
- [ -n "$enc" ] || {
- config_get enc "$vif" encryption
- }
- [ -n "$key" ] || {
- config_get key "$vif" key
- }
+ config_get enc "$vif" encryption
+ config_get key "$vif" key
local net_cfg bridge
config_get bridge "$vif" bridge
config_get password "$vif" password
phase2="phase2=\"auth=${auth:-MSCHAPV2}\""
identity="identity=\"$identity\""
- password="password=\"$password\""
+ password="${password:+password=\"$password\"}"
;;
esac
eap_type="eap=$(echo $eap_type | tr 'a-z' 'A-Z')"
;;
esac
- local fixed_freq bssid1 beacon_interval brates mrate
+ local fixed_freq bssid1 beacon_int brates mrate
config_get ifname "$vif" ifname
config_get bridge "$vif" bridge
config_get ssid "$vif" ssid
config_get bssid "$vif" bssid
bssid1=${bssid:+"bssid=$bssid"}
- beacon_interval=${beacon_int:+"beacon_interval=$beacon_int"}
+ beacon_int=${beacon_int:+"beacon_int=$beacon_int"}
local br brval brsub brstr
[ -n "$basic_rate_list" ] && {
$proto
$freq
${fixed:+"fixed_freq=1"}
- $beacon_interval
+ $beacon_int
$brates
$mrate
$ht_str
$wep_tx_keyidx
}
EOF
- if [ -n "$proto" -o "$key_mgmt" == "NONE" ]; then
+ if [ -n "$proto" -o "$key_mgmt" = "NONE" ]; then
wpa_supplicant ${bridge:+ -b $bridge} -B -P "/var/run/wifi-${ifname}.pid" -D ${driver:-wext} -i "$ifname" -c /var/run/wpa_supplicant-$ifname.conf $options
else
return 0