From 659dd117216676ebcab4ea6115b892bf3e5aab09 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 12 Mar 2004 13:10:35 +0000 Subject: (apply) do not write IPADDR, NETMASK and NETWORK fields in ifcfg-ethX when using DHCP --- perl-install/standalone/drakconnect | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'perl-install/standalone/drakconnect') diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 930a76e72..a130faf9e 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -688,9 +688,11 @@ sub update_list() { sub apply { my ($netc, $intf) = @_; - my %intfs = ($intf->{DEVICE} => $intf); - network::network::sethostname($netc) if is_dynamic_ip(\%intfs); - network::network::configureNetwork2($in, '', $netc, \%intfs); + my $dyn = $intf->{BOOTPROTO} ne 'static'; + my $lintf = $intf; + $dyn and $lintf->{$_} = undef foreach qw(NETMASK NETWORK IPADDR); + network::network::sethostname($netc) if $dyn; + network::network::configureNetwork2($in, '', $netc, { $lintf->{DEVICE} => $lintf }); } sub ethisup { `LC_ALL=C LANGUAGE=C /sbin/ifconfig $_[0]` =~ /inet/ } -- cgit v1.2.1