summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakconnect
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/drakconnect')
-rwxr-xr-xperl-install/standalone/drakconnect8
1 files changed, 5 insertions, 3 deletions
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/ }