diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-01 15:15:19 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-01 15:15:19 +0000 |
commit | 135f49a4f952140fb24fb81d9a577c0b1c72dbbc (patch) | |
tree | a84150f6b7f5a6f9fcabf139f0f6cbbe6c9b91d5 /lib/network/connection/wireless.pm | |
parent | e5ebe7dc672b6f3858c0cfa2e20d1c2180fba109 (diff) | |
download | drakx-net-135f49a4f952140fb24fb81d9a577c0b1c72dbbc.tar drakx-net-135f49a4f952140fb24fb81d9a577c0b1c72dbbc.tar.gz drakx-net-135f49a4f952140fb24fb81d9a577c0b1c72dbbc.tar.bz2 drakx-net-135f49a4f952140fb24fb81d9a577c0b1c72dbbc.tar.xz drakx-net-135f49a4f952140fb24fb81d9a577c0b1c72dbbc.zip |
Preserving wireless network settings (patch by Christian Lohmaier, bug #46010).
Diffstat (limited to 'lib/network/connection/wireless.pm')
-rw-r--r-- | lib/network/connection/wireless.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 0ca26dd..97c9975 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -360,8 +360,15 @@ sub check_device { sub load_interface_settings { my ($self) = @_; - $self->SUPER::load_interface_settings; + $self->network::connection::load_interface_settings; $self->{hide_passwords} = 1; + # override ifcfg with network-specific settings if available + my $network = $self->get_selected_network; + $self->{ifcfg}= $network ? + get_network_ifcfg($network->{ap}) || get_network_ifcfg($network->{essid}) : + $self->{ifcfg}; + + $self->SUPER::map_ifcfg2config_settings; } sub get_networks { @@ -401,11 +408,8 @@ sub get_network_ifcfg { sub guess_network_access_settings { my ($self) = @_; - my $ifcfg; my $network = $self->get_selected_network; - $ifcfg = $network ? - get_network_ifcfg($network->{ap}) || get_network_ifcfg($network->{essid}) : - $self->{ifcfg}; + my $ifcfg = $self->{ifcfg}; $ifcfg ||= {}; $self->{access}{network}{bssid} = $network && $network->{hidden} && $network->{ap}; |