summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-09-11 17:39:13 +0000
committerdamien <damien@mandriva.com>2001-09-11 17:39:13 +0000
commit7427e6d01fbc73c49b0ec5c0b576e718de761ac2 (patch)
treeb3e619ccc2db80b91e53f27c6110a3fa03dd6362 /perl-install/network
parent6010c5693eff384e6b559b7e1577097b8ae1d510 (diff)
downloaddrakx-7427e6d01fbc73c49b0ec5c0b576e718de761ac2.tar
drakx-7427e6d01fbc73c49b0ec5c0b576e718de761ac2.tar.gz
drakx-7427e6d01fbc73c49b0ec5c0b576e718de761ac2.tar.bz2
drakx-7427e6d01fbc73c49b0ec5c0b576e718de761ac2.tar.xz
drakx-7427e6d01fbc73c49b0ec5c0b576e718de761ac2.zip
don't detect ethx if no autodetection.
implement smarter checkboxes
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/ethernet.pm8
-rw-r--r--perl-install/network/netconnect.pm10
2 files changed, 13 insertions, 5 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index fe2d0dd96..7becd4a69 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -63,9 +63,9 @@ sub configure_lan {
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 start")) {
- $in->ask_okcancel(_("Network Configuration"), _("A problem occured while restarting the network: \n\n%s", `/etc/rc.d/init.d/network start`), 0) or return;
+#- 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";
@@ -181,7 +181,7 @@ sub go_ethernet {
sub configureNetwork {
my ($netc, $intf, $first_time) = @_;
local $_;
- any::setup_thiskind($in, 'net', !$::expert, 1);
+ any::setup_thiskind($in, 'net', !$::expert, 1) if $netc->{autodetection};
my @l = detect_devices::getNet() or die _("no network card found");
my @all_cards = conf_network_card_backend ($netc, $intf, undef, undef, undef, undef);
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 7eb4f340c..caf4eea55 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -188,7 +188,15 @@ ifdown eth0
[_("LAN connection") . if_($netc->{autodetect}{lan}, " - " . _("ethernet card(s) detected")), \$conf{lan}]
);
my $e = $in->ask_from(_("Network Configuration Wizard"), _("Choose the connection you want to configure"),
- [ map { { label => $_->[0], val => $_->[1], type => 'bool'} } @l ]
+ [ map { { label => $_->[0], val => $_->[1], type => 'bool' } } @l ],
+ changed => sub {
+ return if !$netc->{autodetection};
+ my $c = 0;
+ $conf{adsl} and $c++;
+ $conf{cable} and $c++;
+ my $a = keys(%{$netc->{autodetect}{lan}});
+ 0 < $a && $a <= $c and $conf{lan} = undef;
+ }
) or goto step_1;
# load_conf ($netcnx, $netc, $intf);