From 110e3deda634adc5876da17c0fbfa451ad2c652e Mon Sep 17 00:00:00 2001 From: damien Date: Mon, 30 Jul 2001 17:39:58 +0000 Subject: corrected ask_connect_now --- perl-install/network/adsl.pm | 1 - perl-install/network/isdn.pm | 1 - perl-install/network/modem.pm | 1 - perl-install/network/netconnect.pm | 3 +++ perl-install/network/tools.pm | 11 +++++++---- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index 48a05dfa5..a312136ec 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -79,7 +79,6 @@ sub adsl_conf { $adsl->{atboot} = $in->ask_yesorno(_("ADSL configuration"), _("Do you want to start your connection at boot?") ); - $::isStandalone and ask_connect_now($adsl, 'ppp0'); 1; } diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index d1e326e20..69b7c7a3d 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -55,7 +55,6 @@ We recommand the light configuration. #system('urpmi --auto --best-output ' . join(' ', $e =~ /light/ ? 'isdn-light' : 'isdn4net', 'isdn4k-utils')); $install->($e =~ /light/ ? 'isdn-light' : 'isdn4net', 'isdn4k-utils'); isdn_write_config_backend($isdn, $e =~ /light/, $netc); - $::isStandalone and ask_connect_now($isdn, 'ippp0'); 1; } diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index aae50b068..206f8dfb0 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -27,7 +27,6 @@ q(#!/bin/bash ifdown ppp0 killall pppd )); - if ($::isStandalone) { ask_connect_now($netcnx->{$netcnx->{type}}, 'ppp0') or goto modem_step_1 } 1; } diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 044357413..b1c74ed2f 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -175,6 +175,7 @@ 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 }; + step_2_1: 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")), @@ -187,6 +188,8 @@ ifdown eth0 } $netc->{internet_cnx_choice} and write_cnx_script($netc); + $::isStandalone and ask_connect_now() or goto step_2_1; + step_3: my $m = _("Congratulation, The network and internet configuration is finished. diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 851569e6d..c6443443e 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -26,10 +26,13 @@ sub write_secret_backend { } sub ask_connect_now { - my ($cnx, $inter) = @_; - if ($in->ask_yesorno(_("Internet configuration"), - _("Do you want to try to connect to the Internet now?") - )) { +# my ($cnx, $inter) = @_; + my $a; + eval { $a = $in->ask_yesorno(_("Internet configuration"), + _("Do you want to try to connect to the Internet now?") + ) }; + return 0 if $@; + if ($a) { my $up; { my $w = $in->wait_message('', _("Testing your connection..."), 1); -- cgit v1.2.1