summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-05-23 09:14:22 +0000
committerOlivier Blin <oblin@mandriva.com>2008-05-23 09:14:22 +0000
commit083632066c8b364437aac6754dafef2708c681cb (patch)
treeefff86521f210fd450d9be9c70530ede60d9161c
parentb14a202e44075b977f79f6eca6b2b375c0cfab2c (diff)
downloaddrakx-net-083632066c8b364437aac6754dafef2708c681cb.tar
drakx-net-083632066c8b364437aac6754dafef2708c681cb.tar.gz
drakx-net-083632066c8b364437aac6754dafef2708c681cb.tar.bz2
drakx-net-083632066c8b364437aac6754dafef2708c681cb.tar.xz
drakx-net-083632066c8b364437aac6754dafef2708c681cb.zip
try to use ttyUSB2 as control device first
-rw-r--r--lib/network/connection/cellular_card.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm
index 432a048..5eaa7c3 100644
--- a/lib/network/connection/cellular_card.pm
+++ b/lib/network/connection/cellular_card.pm
@@ -62,10 +62,13 @@ sub get_tty_device {
sub get_control_device {
my ($self) = @_;
my $tty_device = $self->get_tty_device;
- my $usb_control_device = "/dev/ttyUSB1";
- $tty_device eq "/dev/ttyUSB0" && -e $usb_control_device ?
- $usb_control_device :
- $tty_device;
+ if ($tty_device eq "/dev/ttyUSB0") {
+ for my $id (2, 1) {
+ my $usb_control_device = "/dev/ttyUSB" . $id;
+ return $usb_control_device if -e $usb_control_device;
+ }
+ }
+ $tty_device;
}
sub network_scan_is_slow() { 1 }