From ccef46b7d95a3ccab4d84b546512eab9975ab782 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 17 Mar 2004 15:17:10 +0000 Subject: fix pci modem support: - handle manually installed drivers - removed urpmi sources - faster checking for driver presence --- perl-install/network/netconnect.pm | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'perl-install/network/netconnect.pm') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 1ae3d1947..52cf9625b 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -466,24 +466,29 @@ Take a look at http://www.linmodems.org"), return "ppp_provider" if $ntf_name =~ m!^/dev/!; return "choose_serial_port" if !$ntf_name; - my %relocations = (ltmodem => $in->do_pkgs->check_kernel_module_packages('ltmodem')); my $type; + + my %pkgs2path = ( + hcfpcimodem => '/usr/sbin/hcfpciconfig', + hsflinmodem => '/usr/sbin/hsfconfig', + ltmodem => '/etc/devfs/conf.d/ltmodem.conf', + ); + + my %devices = (ltmodem => '/dev/ttyS14', + hsflinmodem => '/dev/ttySHSF0' + ); + if (my $driver = $netc->{autodetect}{modem}{$modem_name}{driver}) { $driver =~ /^Hcf:/ and $type = "hcfpcimodem"; $driver =~ /^Hsf:/ and $type = "hsflinmodem"; $driver =~ /^LT:/ and $type = "ltmodem"; - $relocations{$type} || $type && $in->do_pkgs->what_provides($type) or $type = undef; + $type = undef if !($type && ( -f $pkgs2path{$type} || $in->do_pkgs->ensure_is_installed_if_available($type, $pkgs2path{$type}))); + $modem->{device} = $devices{$type} || '/dev/modem' if $type; # automatically linked by /etc/devfs/conf entry } - return "no_supported_winmodem" if !$type; - - $in->do_pkgs->install($relocations{$type} ? @{$relocations{$type}} : $type); - - #$type eq 'ltmodem' and $netc->{autodetect}{modem} = '/dev/ttyS14'; - #- fallback to modem configuration (beware to never allow test it). - return "ppp_provider"; + return $type ? "ppp_provider" : "no_supported_winmodem"; }, }, -- cgit v1.2.1