summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm26
1 files changed, 16 insertions, 10 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index a51a09909..b760a436c 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -391,24 +391,30 @@ sub getTVcards() {
}
sub getSerialModem {
- my ($modem, $o_mouse) = @_;
+ my ($o_mouse) = @_;
my $mouse = $o_mouse || {};
$mouse->{device} = readlink "/dev/mouse";
my $serdev = arch() =~ /ppc/ ? "macserial" : "serial";
eval { modules::load($serdev) };
+ my @modems;
+
probeSerialDevices();
- foreach (map { "ttyS$_" } (0..7)) {
- next if $mouse->{device} =~ /$_/;
- next unless -e "/dev/$_";
- hasModem("/dev/$_") and $modem->{device} = $_, last;
+ foreach my $port (map { "ttyS$_" } (0..7)) {
+ next if $mouse->{device} =~ /$port/;
+ my $device = "/dev/$port";
+ next unless -e $device && hasModem($device);
+ push @modems, $serialprobe{$device};
}
-
- #- add an alias for macserial on PPC
- modules::add_alias('serial', $serdev) if arch() =~ /ppc/ && $modem->{device};
my @devs = pcmcia_probe();
- foreach (@devs) { $_->{type} =~ /serial/ and $modem->{device} = $_->{device} }
- $modem;
+ foreach my $modem (@modems) {
+ $modem->{device} = $modem->{DEVICE};
+ delete $modem->{DEVICE};
+ #- add an alias for macserial on PPC
+ modules::add_alias('serial', $serdev) if arch() =~ /ppc/ && $modem->{device};
+ foreach (@devs) { $_->{type} =~ /serial/ and $modem->{device} = $_->{device} }
+ }
+ @modems;
}
sub getModem() {