summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-10-02 17:53:15 +0000
committerOlivier Blin <oblin@mandriva.com>2008-10-02 17:53:15 +0000
commita22a232fd1a7b1e86af9da0f3f2cf03fec2cfc62 (patch)
treeca9c8e3945e9299b775530c05e7ba5c80f35ffad
parent42c7f90e242998044c2ef34bf2b4028b4e93bbd8 (diff)
downloaddrakx-net-a22a232fd1a7b1e86af9da0f3f2cf03fec2cfc62.tar
drakx-net-a22a232fd1a7b1e86af9da0f3f2cf03fec2cfc62.tar.gz
drakx-net-a22a232fd1a7b1e86af9da0f3f2cf03fec2cfc62.tar.bz2
drakx-net-a22a232fd1a7b1e86af9da0f3f2cf03fec2cfc62.tar.xz
drakx-net-a22a232fd1a7b1e86af9da0f3f2cf03fec2cfc62.zip
run wpa_cli select_network as fallback when network monitor (mandi) is not available
-rw-r--r--lib/network/connection/wireless.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 14f571b..f46b677 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -714,8 +714,12 @@ sub connect {
refresh_roaming_ids($self);
my $network = $self->get_selected_network;
if ($network && defined $network->{id}) {
- eval { $net->{monitor}->select_network($network->{id}) };
- return !$@;
+ if ($net->{monitor}) {
+ eval { $net->{monitor}->select_network($network->{id}) };
+ return !$@;
+ } else {
+ run_program::run('/usr/sbin/wpa_cli', 'select_network', $network->{id});
+ }
}
}
}