diff options
Diffstat (limited to 'lib/network/connection/wireless.pm')
-rw-r--r-- | lib/network/connection/wireless.pm | 8 |
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}); + } } } } |