From 2d03c9d1c7e5eb6b5bb0fd360ff5c809ec259c66 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 17 Jan 2002 09:41:27 +0000 Subject: draknet : success message only if success --- perl-install/network/netconnect.pm | 19 +++++++++++-------- perl-install/network/tools.pm | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'perl-install/network') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 3e0029cf5..c5ecbbbdf 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -235,11 +235,7 @@ ifdown eth0 undef $netc->{NET_DEVICE}; } - write_initscript(); - $::isStandalone && member($netc->{internet_cnx_choice}, ('modem', 'adsl', 'isdn')) and ask_connect_now(); - - step_3: - + my $success = 1; network::configureNetwork2($in, $prefix, $netc, $intf); my $network_configured = 1; @@ -247,15 +243,22 @@ ifdown eth0 _("The network needs to be restarted"), 1))) { #- run_program::rooted($prefix, "/etc/rc.d/init.d/network stop"); if (!run_program::rooted($prefix, "/etc/rc.d/init.d/network restart")) { - $in->ask_okcancel(_("Network Configuration"), _("A problem occured while restarting the network: \n\n%s", `/etc/rc.d/init.d/network restart`), 0) or return; + $success = 0; + $in->ask_okcancel(_("Network Configuration"), _("A problem occured while restarting the network: \n\n%s", `/etc/rc.d/init.d/network restart`), 0); } } - my $m = _("Congratulations, the network and internet configuration is finished. + write_initscript(); + $::isStandalone && member($netc->{internet_cnx_choice}, ('modem', 'adsl', 'isdn')) and $success = ask_connect_now(); + + step_3: + + my $m = $success ? _("Congratulations, the network and internet configuration is finished. The configuration will now be applied to your system.\n") . if_($::isStandalone && $in->isa('interactive_gtk'), _("After that is done, we recommend you to restart your X -environnement to avoid hostname changing problem.")); +environnement to avoid hostname changing problem.")) : _("Problems occur during configuration. +Test your connection via net_monitor or mcc. If your connection doesn't work, you might want to relaunch the configuration"); if ($::isWizard) { $::Wizard_no_previous=1; $::Wizard_finished=1; diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index e5ba822b7..3ee47d864 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -61,7 +61,7 @@ Try to reconfigure your connection."); $::isInstall and disconnect_backend(); } undef $::Wizard_no_previous; - 1; + $up; } sub connect_backend { run_program::rooted($prefix, "$connect_prog &") } -- cgit v1.2.1