From 84a49da0acdb4e741c09bae2de7e04fcea949869 Mon Sep 17 00:00:00 2001 From: damien Date: Mon, 30 Jul 2001 23:30:37 +0000 Subject: corrected ask_connect_now behaviour --- perl-install/network/netconnect.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index b1c74ed2f..bb136e64b 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -176,15 +176,17 @@ ifdown eth0 $conf{lan} and do { require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2 }; step_2_1: - if (keys %{$netc->{internet_cnx}} > 1) { + my $nb = keys %{$netc->{internet_cnx}}; + if ($nb < 1) { + } elsif ($nb > 1) { $in->ask_from_entries_refH(_("Network Configuration Wizard"), _("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n" . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center")), [ { label => _("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ]} ] ) or goto step_2; - } elsif (keys %{$netc->{internet_cnx}} == 1) { - $netc->{internet_cnx_choice} = $netc->{internet_cnx}[1]; + } elsif ($nb == 1) { + $netc->{internet_cnx_choice} = (keys %{$netc->{internet_cnx}})[0]; } $netc->{internet_cnx_choice} and write_cnx_script($netc); -- cgit v1.2.1