From 442b3185cca011f58168fddc59f5ece18fc20f5e Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 2 Mar 2005 18:41:37 +0000 Subject: delete gateway settings if reconfiguring the gateway interface to dhcp --- perl-install/network/netconnect.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install/network') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 77253ef51..9dc723fdf 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -1069,7 +1069,14 @@ notation (for example, 1.2.3.4).")), $ethntf->{MII_NOT_SUPPORTED} = bool2yesno(!$hotplug); $ethntf->{HWADDR} = $track_network_id or delete $ethntf->{HWADDR}; $netc->{$_} = $ethntf->{DEVICE} foreach qw(NET_DEVICE NET_INTERFACE); - $in->do_pkgs->install($netc->{dhcp_client}) if $auto_ip; + if ($auto_ip) { + $in->do_pkgs->install($netc->{dhcp_client}); + #- delete gateway settings if reconfiguring the gateway interface to dhcp + if ($netc->{GATEWAYDEV} eq $ntf_name || @all_cards > 1) { + delete $netc->{GATEWAY}; + delete $netc->{GATEWAYDEV}; + } + } return $is_wireless ? "wireless" : "static_hostname"; }, }, -- cgit v1.2.1