From 34644c0e005db1265884ef05306285e2eb609243 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 24 Nov 2003 11:42:43 +0000 Subject: fix isdn detection: detect all isdn cards, not only the first one --- perl-install/network/netconnect.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl-install/network/netconnect.pm') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 9faf60002..1f3149ffd 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -18,7 +18,6 @@ sub detect { my ($auto_detect) = @_; require network::isdn; $auto_detect->{isdn} = network::isdn::isdn_detect_backend(); - $auto_detect->{isdn}{description} =~ s/.*\|//; modules::load_category('network/main|gigabit|usb'); require network::ethernet; @@ -107,7 +106,7 @@ If you don't want to use the auto detection, deselect the checkbox. my %net_conf_callbacks = (adsl => sub { require network::adsl; network::adsl::configure($netcnx, $netc, $intf, $first_time) }, cable => sub { require network::ethernet; network::ethernet::configure_cable($netcnx, $netc, $intf, $first_time) }, - isdn => sub { require network::isdn; network::isdn::configure($netcnx, $netc, undef) }, + isdn => sub { require network::isdn; network::isdn::configure($netcnx, $netc) }, lan => sub { require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) }, modem => sub { require network::modem; network::modem::configure($in, $netcnx, $mouse, $netc) }, winmodem => sub { require network::modem; network::modem::winmodemConfigure($in, $netcnx, $mouse, $netc) }, @@ -116,13 +115,13 @@ If you don't want to use the auto detection, deselect the checkbox. $conf{$_} = values %{$netc->{autodetect}{$_}} ? 1 : 0 foreach 'lan'; $conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach qw(adsl cable modem winmodem); - $conf{isdn} = $netc->{autodetect}{isdn}{driver} ? 1 : 0; + $conf{isdn} = any { $_->{driver} } values %{$netc->{autodetect}{isdn}}; step_2: my @l = ( [ join('', N("Normal modem connection"), if_($conf{modem}, " - " . N("detected on port %s", $netc->{autodetect}{modem}))), \$conf{modem} ], [ join('', N("Winmodem connection"), if_($conf{winmodem}, " - " . N("detected"))), \$conf{winmodem} ], - [ join('', N("ISDN connection"), if_($conf{isdn}, " - " . N("detected %s", $netc->{autodetect}{isdn}{description}))), \$conf{isdn} ], + [ join('', N("ISDN connection"), if_($conf{isdn}, " - " . N("detected %s", join(', ', map { $_->{description} } values %{$netc->{autodetect}{isdn}})))), \$conf{isdn} ], [ join('', N("ADSL connection"), if_($conf{adsl}, " - " . N("detected"))), \$conf{adsl} ], [ join('', N("Cable connection"), if_($conf{cable}, " - " . N("cable connection detected"))), \$conf{cable} ], [ join('', N("LAN connection"), if_($conf{lan}, " - " . N("ethernet card(s) detected"))), \$conf{lan} ] -- cgit v1.2.1