From e6e493a31227f8f278c97800eff84d47f28f5d4e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 16 Mar 2002 12:11:40 +0000 Subject: small cleanup on untested code (need testing:) --- perl-install/network/ethernet.pm | 4 +--- 1 file changed, 1 insertion(+), 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}; -- cgit v1.2.1