diff options
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 204e4f1cc..d11cfd657 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -345,6 +345,48 @@ sub getATARAID { values %l; } +#-AT&F&O2B40 +#- DialString=ATDT0231389595(( + +#- modem_detect_backend : detects modem on serial ports and fills the infos in $modem : detects only one card +#- input +#- $modem +#- $mouse : facultative, hash containing device to exclude not to test mouse port : ( device => /ttyS[0-9]/ ) +#- output: +#- $modem->{device} : device where the modem were detected +sub getSerialModem { + my ($modem, $mouse) = @_; + $mouse ||= {}; + $mouse->{device} = readlink "/dev/mouse"; + my $serdev = arch() =~ /ppc/ ? "macserial" : "serial"; + eval { modules::load($serdev) }; + + detect_devices::probeSerialDevices(); + foreach ('modem', map { "ttyS$_" } (0..7)) { + next if $mouse->{device} =~ /$_/; + next unless -e "/dev/$_"; + detect_devices::hasModem("/dev/$_") and $modem->{device} = $_, last; + } + + #- add an alias for macserial on PPC + modules::add_alias('serial', $serdev) if (arch() =~ /ppc/ && $modem->{device}); + my @devs = detect_devices::pcmcia_probe(); + foreach (@devs) { + $_->{type} =~ /serial/ and $modem->{device} = $_->{device}; + } +} + +sub getModem() { + my @pci_modems = grep { $_->{driver} eq 'Bad:www.linmodems.org' } probeall(0); + my $serial_modem = {}; + getSerialModem($serial_modem); + @pci_modems, $serial_modem; +} + +sub getSpeedtouch { + grep { $_->{description} eq 'Alcatel|USB ADSL Modem (Speed Touch)' } probeall(0); +} + sub getNet() { grep { !(($::isStandalone || $::live) && /plip/) && c::hasNetDevice($_) } @netdevices; } |