summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2003-03-04 21:01:02 +0000
committerFrederic Lepied <flepied@mandriva.com>2003-03-04 21:01:02 +0000
commit19aa30f437bad3f554e6739867bd588cd640507e (patch)
tree4d4b21a709927ee5b8110a760bca02b0d95a2580 /perl-install/network/network.pm
parenta5cb3bff6a96e73f00c173338b0ef3a308d2d9ed (diff)
downloaddrakx-backup-do-not-use-19aa30f437bad3f554e6739867bd588cd640507e.tar
drakx-backup-do-not-use-19aa30f437bad3f554e6739867bd588cd640507e.tar.gz
drakx-backup-do-not-use-19aa30f437bad3f554e6739867bd588cd640507e.tar.bz2
drakx-backup-do-not-use-19aa30f437bad3f554e6739867bd588cd640507e.tar.xz
drakx-backup-do-not-use-19aa30f437bad3f554e6739867bd588cd640507e.zip
allow to set hostname in DHCP mode
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 49f79fb89..13aa34dcf 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -99,7 +99,7 @@ sub write_conf {
}
$netc->{NETWORKING} = 'yes';
- setVarsInSh($file, $netc, if_(!$netc->{DHCP}, qw(HOSTNAME)), qw(NETWORKING GATEWAY GATEWAYDEV NISDOMAIN));
+ setVarsInSh($file, $netc, qw(HOSTNAME NETWORKING GATEWAY GATEWAYDEV NISDOMAIN));
}
sub write_zeroconf {
@@ -543,7 +543,7 @@ sub configureNetwork2 {
write_conf("$etc/sysconfig/network", $netc);
write_resolv_conf("$etc/resolv.conf", $netc) if ! $netc->{DHCP};
write_interface_conf("$etc/sysconfig/network-scripts/ifcfg-$_->{DEVICE}", $_, $netc, $prefix) foreach grep { $_->{DEVICE} } values %$intf;
- add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf) if $netc->{HOSTNAME};
+ add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf) if $netc->{HOSTNAME} and ! $netc->{DHCP};
add2hosts("$etc/hosts", "localhost", "127.0.0.1");
any { $_->{BOOTPROTO} eq "dhcp" } values %$intf and $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client');