summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-03-16 12:11:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-03-16 12:11:40 +0000
commite6e493a31227f8f278c97800eff84d47f28f5d4e (patch)
treee0fbf0db8a400ab7ade6c9bb00aa5fde4b6ef294 /perl-install
parentb4fa1b4ba123a6a8f2895a7317c54173bbf5782a (diff)
downloaddrakx-backup-do-not-use-e6e493a31227f8f278c97800eff84d47f28f5d4e.tar
drakx-backup-do-not-use-e6e493a31227f8f278c97800eff84d47f28f5d4e.tar.gz
drakx-backup-do-not-use-e6e493a31227f8f278c97800eff84d47f28f5d4e.tar.bz2
drakx-backup-do-not-use-e6e493a31227f8f278c97800eff84d47f28f5d4e.tar.xz
drakx-backup-do-not-use-e6e493a31227f8f278c97800eff84d47f28f5d4e.zip
small cleanup on untested code (need testing:)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/ethernet.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index fc8a0c975..7c2afc405 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -61,10 +61,8 @@ sub configure_lan {
$::isInstall and $in->set_help('configureNetworkIP');
configureNetwork($netc, $intf, $first_time) or return;
configureNetwork2($in, $prefix, $netc, $intf);
- my $hasdhcp = 0;
- foreach (keys(%$intf)) { $intf->{$_}{BOOTPROTO} eq "dhcp" and $hasdhcp = 1}
$netc->{NETWORKING} = "yes";
- if ($netc->{GATEWAY} || $hasdhcp) {
+ if ($netc->{GATEWAY} || grep { $_->{BOOTPROTO} eq 'dhcp' } values %$intf) {
$netcnx->{type}='lan';
$netcnx->{NET_DEVICE} = $netc->{NET_DEVICE} = '';
$netcnx->{NET_INTERFACE} = 'lan'; #$netc->{NET_INTERFACE};