From 6c8dd68e7062a96d88a59cc128ac01ec28490a97 Mon Sep 17 00:00:00 2001 From: damien Date: Mon, 30 Jul 2001 15:54:38 +0000 Subject: added internet connection selection in case of multiple configurations --- perl-install/network/netconnect.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'perl-install/network/netconnect.pm') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 9d83fb934..72098b3fb 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -144,12 +144,15 @@ ifdown eth0 } step_2: + my $set_default; my %conf; + $conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach qw(modem adsl cable lan); + $conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1: 0; my @l = ( [_("Normal modem connection"), $netc->{autodetect}{modem}, __("detected on port %s"), \$conf{modem}], [_("ISDN connection"), $netc->{autodetect}{isdn}{description}, __("detected %s"), \$conf{isdn}], - [_("DSL (or ADSL) connection"), $netc->{autodetect}{adsl}, __("detected on interface %s"), \$conf{adsl}], + [_("ADSL connection"), $netc->{autodetect}{adsl}, __("detected on interface %s"), \$conf{adsl}], [_("Cable connection"), $netc->{autodetect}{cable}, __("cable connection detected"), \$conf{cable}], [_("LAN connection"), $netc->{autodetect}{lan}, __("ethernet card(s) detected"), \$conf{lan}] ); @@ -172,6 +175,19 @@ ifdown eth0 $conf{cable} and do { require network::ethernet; network::ethernet::configure_cable($netcnx, $netc, $intf, $first_time) or goto step_2 }; $conf{lan} and do { require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2 }; + if (keys %{$netc->{internet_cnx}} > 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]; + } + print " - --------- -- - -------\n" . $netc->{internet_cnx_choice} . "------------\n"; + $netc->{internet_cnx_choice} and write_cnx_script($netc); + step_3: my $m = _("Congratulation, The network and internet configuration is finished. -- cgit v1.2.1