summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-24 12:33:00 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-24 12:33:00 +0000
commit27db784a894ab0675d47eb34dbc37af08bdec9df (patch)
treed6f3a41bbd8cea1dfe022f13003b163d5108d297 /perl-install/network
parentd345f0125f2d6da02eab49a890c781c889d17e8c (diff)
downloaddrakx-backup-do-not-use-27db784a894ab0675d47eb34dbc37af08bdec9df.tar
drakx-backup-do-not-use-27db784a894ab0675d47eb34dbc37af08bdec9df.tar.gz
drakx-backup-do-not-use-27db784a894ab0675d47eb34dbc37af08bdec9df.tar.bz2
drakx-backup-do-not-use-27db784a894ab0675d47eb34dbc37af08bdec9df.tar.xz
drakx-backup-do-not-use-27db784a894ab0675d47eb34dbc37af08bdec9df.zip
(configureNetwork2) always add an hostname alias and add it on the
loopback device (bug 10345)
Diffstat (limited to 'perl-install/network')
-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 89deb2793..b2402413e 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -420,9 +420,9 @@ 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} ne 'ppp0' } values %$intf;
- add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf) if $netc->{HOSTNAME} && !$netc->{DHCP};
+ add2hosts("$etc/hosts", $netc->{HOSTNAME}, "127.0.0.1") if $netc->{HOSTNAME});
add2hosts("$etc/hosts", "localhost", "127.0.0.1");
-
+
any { $_->{BOOTPROTO} eq "dhcp" } values %$intf and $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client');
if ($netc->{ZEROCONF_HOSTNAME}) {
$in->do_pkgs->ensure_binary_is_installed('tmdns', 'tmdns', 'auto') if !$in->do_pkgs->is_installed('bind');