summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-12 13:10:35 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-12 13:10:35 +0000
commit659dd117216676ebcab4ea6115b892bf3e5aab09 (patch)
treec2cb3c84e7a65525c02e921d4b9e6ad9eaf030c7 /perl-install/standalone
parent9006f99d2dfcb94b0ac7ac340777d0534d344d8e (diff)
downloaddrakx-backup-do-not-use-659dd117216676ebcab4ea6115b892bf3e5aab09.tar
drakx-backup-do-not-use-659dd117216676ebcab4ea6115b892bf3e5aab09.tar.gz
drakx-backup-do-not-use-659dd117216676ebcab4ea6115b892bf3e5aab09.tar.bz2
drakx-backup-do-not-use-659dd117216676ebcab4ea6115b892bf3e5aab09.tar.xz
drakx-backup-do-not-use-659dd117216676ebcab4ea6115b892bf3e5aab09.zip
(apply) do not write IPADDR, NETMASK and NETWORK fields in ifcfg-ethX
when using DHCP
Diffstat (limited to 'perl-install/standalone')
-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/ }