diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-02 14:19:00 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-02 14:19:00 +0000 |
commit | 283a0af5227182f2f035f1a5f2fd94e7f3075811 (patch) | |
tree | b1213e36c8bd7b79a1d9c25118009d39ceaf6569 /lib/network | |
parent | b76aaeed03155c95c862abe15ff036f8ff6d486f (diff) | |
download | drakx-net-283a0af5227182f2f035f1a5f2fd94e7f3075811.tar drakx-net-283a0af5227182f2f035f1a5f2fd94e7f3075811.tar.gz drakx-net-283a0af5227182f2f035f1a5f2fd94e7f3075811.tar.bz2 drakx-net-283a0af5227182f2f035f1a5f2fd94e7f3075811.tar.xz drakx-net-283a0af5227182f2f035f1a5f2fd94e7f3075811.zip |
extract add_nework_to_wpa_supplicant function
Diffstat (limited to 'lib/network')
-rw-r--r-- | lib/network/connection/wireless.pm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 239320a..9c68ab7 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -599,16 +599,19 @@ set TxRate=0)), $self->SUPER::build_ifcfg_settings($settings); } +sub add_nework_to_wpa_supplicant { + my ($self) = @_; + if ($self->{access}{network}{encryption} eq 'wpa-eap') { + wpa_supplicant_add_eap_network($self->{access}{network}); + } else { + wpa_supplicant_add_network($self->{access}{network}{essid}, $self->{access}{network}{encryption}, $self->{access}{network}{key}, $self->{access}{network}{force_ascii_key}, $self->{access}{network}{mode}); + } +} + sub write_settings { my ($self, $o_net, $o_modules_conf) = @_; - if ($self->need_wpa_supplicant) { - if ($self->{access}{network}{encryption} eq 'wpa-eap') { - wpa_supplicant_add_eap_network($self->{access}{network}); - } else { - wpa_supplicant_add_network($self->{access}{network}{essid}, $self->{access}{network}{encryption}, $self->{access}{network}{key}, $self->{access}{network}{force_ascii_key}, $self->{access}{network}{mode}); - } - } + $self->add_nework_to_wpa_supplicant if $self->need_wpa_supplicant; wlan_ng_configure($self->{access}{network}{essid}, $self->{access}{network}{key}, $self->get_interface, $self->get_driver) if $self->{thirdparty}{name} eq 'prism2'; |