summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-09-19 17:45:41 +0000
committerdamien <damien@mandriva.com>2001-09-19 17:45:41 +0000
commit0e34b400ff4ffffd776c616ff9705009209ebb08 (patch)
tree076fd0f4dee984b882d133ec41d4b5bad86ea035 /perl-install/network
parent4ba41be7ed4ab9eaeaf35913059671bc458107c6 (diff)
downloaddrakx-0e34b400ff4ffffd776c616ff9705009209ebb08.tar
drakx-0e34b400ff4ffffd776c616ff9705009209ebb08.tar.gz
drakx-0e34b400ff4ffffd776c616ff9705009209ebb08.tar.bz2
drakx-0e34b400ff4ffffd776c616ff9705009209ebb08.tar.xz
drakx-0e34b400ff4ffffd776c616ff9705009209ebb08.zip
network restart at better place
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm1
-rw-r--r--perl-install/network/ethernet.pm23
-rw-r--r--perl-install/network/netconnect.pm17
3 files changed, 21 insertions, 20 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index b8356dd6e..4a6e0bd9c 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -51,6 +51,7 @@ If you don't know, choose 'use pppoe'"), [__("use pppoe"), __("use pptp"), __("u
$netcnx->{"adsl_$type"}{vpivci} = '';
adsl_conf($netcnx->{"adsl_$type"}, $netc, $intf, $type) or goto conf_adsl_step1;
}
+ $type =~ /speedtouch/ or $netconnect::need_restart_network = 1;
1;
}
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index ba1dbbfbc..628d61886 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -61,13 +61,6 @@ sub configure_lan {
$::isInstall and $in->set_help('configureNetworkIP');
configureNetwork($netc, $intf, $first_time) or return;
configureNetwork2($in, $prefix, $netc, $intf);
- if ($::isStandalone and ($::expert or $in->ask_yesorno(_("Network configuration"),
- _("Do you want to restart the network"), 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;
- }
- }
$netc->{NETWORKING} = "yes";
if ($netc->{GATEWAY}) {
$netcnx->{type}='lan';
@@ -105,10 +98,10 @@ I cannot set up this connection type.")) and return;
$::isStandalone and modules::write_conf($prefix);
my $device=conf_network_card_backend($netc, $intf, $type, $interface, $ipadr, $netadr, $interface);
- if ( $::isStandalone and !($type eq "dhcp")) {
- $in->ask_yesorno(_("Network interface"),
- _("I'm about to restart the network device:\n") . $device . _("\nDo you agree?"), 1) and configureNetwork2($in, $prefix, $netc, $intf) and system("$prefix/sbin/ifdown $device;$prefix/sbin/ifup $device");
- }
+# if ( $::isStandalone and !($type eq "dhcp")) {
+# $in->ask_yesorno(_("Network interface"),
+# _("I'm about to restart the network device:\n") . $device . _("\nDo you agree?"), 1) and configureNetwork2($in, $prefix, $netc, $intf) and system("$prefix/sbin/ifdown $device;$prefix/sbin/ifup $device");
+# }
1;
}
@@ -171,10 +164,10 @@ sub go_ethernet {
conf_network_card($netc, $intf, $type, $ipadr, $netadr) or return;
$netc->{NET_INTERFACE}=$netc->{NET_DEVICE};
configureNetwork($netc, $intf, $first_time) or return;
- if ( $::isStandalone and $netc->{NET_DEVICE}) {
- $in->ask_yesorno(_("Network interface"),
- _("I'm about to restart the network device %s. Do you agree?", $netc->{NET_DEVICE}), 1) and system("$prefix/sbin/ifdown $netc->{NET_DEVICE}; $prefix/sbin/ifup $netc->{NET_DEVICE}");
- }
+# if ( $::isStandalone and $netc->{NET_DEVICE}) {
+# $in->ask_yesorno(_("Network interface"),
+# _("I'm about to restart the network device %s. Do you agree?", $netc->{NET_DEVICE}), 1) and system("$prefix/sbin/ifdown $netc->{NET_DEVICE}; $prefix/sbin/ifup $netc->{NET_DEVICE}");
+# }
1;
}
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 78bd7c70a..e208f127a 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -200,12 +200,11 @@ ifdown eth0
) or goto step_1;
# load_conf ($netcnx, $netc, $intf);
-
$conf{modem} and do { pre_func("modem"); require network::modem; network::modem::configure($netcnx, $mouse, $netc) or goto step_2 };
$conf{isdn} and do { pre_func("isdn"); require network::isdn; network::isdn::configure($netcnx, $netc) or goto step_2 };
$conf{adsl} and do { pre_func("adsl"); require network::adsl; network::adsl::configure($netcnx, $netc, $intf, $first_time) or goto step_2};
- $conf{cable} and do { pre_func("cable"); require network::ethernet; network::ethernet::configure_cable($netcnx, $netc, $intf, $first_time) or goto step_2 };
- $conf{lan} and do { pre_func("local network"); require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2 };
+ $conf{cable} and do { pre_func("cable"); require network::ethernet; network::ethernet::configure_cable($netcnx, $netc, $intf, $first_time) or goto step_2; $netconnect::need_restart_network = 1; };
+ $conf{lan} and do { pre_func("local network"); require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2; $netconnect::need_restart_network = 1; };
step_2_1:
my $nb = keys %{$netc->{internet_cnx}};
@@ -234,6 +233,16 @@ ifdown eth0
step_3:
+ network::configureNetwork2($in, $prefix, $netc, $intf);
+
+ if ($netconnect::need_restart_network && $::isStandalone and ($::expert or $in->ask_yesorno(_("Network configuration"),
+ _("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;
+ }
+ }
+
my $m = _("Congratulations, the network and internet configuration is finished.
The configuration will now be applied to your system.\n") . if_($::isStandalone && $in->isa('interactive_gtk'),
@@ -249,8 +258,6 @@ environnement to avoid hostname changing problem."));
step_5:
- network::configureNetwork2($in, $prefix, $netc, $intf);
-
if ($netcnx->{type} =~ /modem/ || $netcnx->{type} =~ /isdn_external/) {
output "$prefix$connect_prog",
qq(