diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-23 09:14:22 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-23 09:14:22 +0000 |
commit | 083632066c8b364437aac6754dafef2708c681cb (patch) | |
tree | efff86521f210fd450d9be9c70530ede60d9161c /lib | |
parent | b14a202e44075b977f79f6eca6b2b375c0cfab2c (diff) | |
download | drakx-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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/connection/cellular_card.pm | 11 |
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 } |