summaryrefslogtreecommitdiffstats
path: root/perl-install/network/wireless.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-08-30 16:54:21 +0000
committerOlivier Blin <oblin@mandriva.org>2005-08-30 16:54:21 +0000
commit237a287656548315efbbc4e0161cf6edee005c26 (patch)
tree691e3d77c464ffdc086f9cd0924f72ab2732c80f /perl-install/network/wireless.pm
parent9478e0e4744c1fd4cc5e2d5bab82b124191b93fd (diff)
downloaddrakx-237a287656548315efbbc4e0161cf6edee005c26.tar
drakx-237a287656548315efbbc4e0161cf6edee005c26.tar.gz
drakx-237a287656548315efbbc4e0161cf6edee005c26.tar.bz2
drakx-237a287656548315efbbc4e0161cf6edee005c26.tar.xz
drakx-237a287656548315efbbc4e0161cf6edee005c26.zip
- configure wpa_supplicant correctly for shared or passwordless connections
- split write_interface_setttings out of network::network::write_interface_conf - wpa_supplicant may list some networks twice, handle it - rewrite drakroam to use wpa_supplicant
Diffstat (limited to 'perl-install/network/wireless.pm')
-rw-r--r--perl-install/network/wireless.pm26
1 files changed, 14 insertions, 12 deletions
diff --git a/perl-install/network/wireless.pm b/perl-install/network/wireless.pm
index 62971bcaf..79a6ec9a0 100644
--- a/perl-install/network/wireless.pm
+++ b/perl-install/network/wireless.pm
@@ -108,19 +108,21 @@ sub wpa_supplicant_add_network {
my $network = {
ssid => qq("$essid"),
scan_ssid => 1,
- $enc_mode eq 'wpa-psk' ?
- (
- psk => convert_key_for_wpa_supplicant($key),
- ) :
- member($enc_mode, qw(open restricted)) ?
- (
- key_mgmt => 'NONE',
- wep_key0 => convert_key_for_wpa_supplicant($key),
- wep_tx_keyidx => 0,
- auth_alg => 'SHARED',
- ) :
- ()
};
+
+ if ($enc_mode eq 'wpa-psk') {
+ $network->{psk} = convert_key_for_wpa_supplicant($key);
+ } else {
+ $network->{key_mgmt} = 'NONE';
+ if (member($enc_mode, qw(open restricted))) {
+ put_in_hash($network, {
+ wep_key0 => convert_key_for_wpa_supplicant($key),
+ wep_tx_keyidx => 0,
+ auth_alg => $enc_mode eq 'restricted' ? 'SHARED' : 'OPEN',
+ });
+ }
+ }
+
@$conf = difference2($conf, [ wpa_supplicant_find_similar($conf, $network) ]);
push @$conf, $network;
wpa_supplicant_write_conf($conf);