summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2003-02-07 20:06:45 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2003-02-07 20:06:45 +0000
commit5fbdbea82dcfea56fec179c7ba26ed5ee170cb79 (patch)
treea27b191254c1775c247b32b28067a0906eb641ed
parent6c2a9b7e3473d1138bb32ece5f026927441b0b79 (diff)
downloaddrakx-5fbdbea82dcfea56fec179c7ba26ed5ee170cb79.tar
drakx-5fbdbea82dcfea56fec179c7ba26ed5ee170cb79.tar.gz
drakx-5fbdbea82dcfea56fec179c7ba26ed5ee170cb79.tar.bz2
drakx-5fbdbea82dcfea56fec179c7ba26ed5ee170cb79.tar.xz
drakx-5fbdbea82dcfea56fec179c7ba26ed5ee170cb79.zip
- DHCP & Zeroconf fixes for installation
- fix '217.0.0.1 localhost' not written in /etc/hosts when using DHCP
-rw-r--r--perl-install/network/network.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 44b984c09..5bbb10ebb 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -459,8 +459,9 @@ sub easy_dhcp {
put_in_hash($netc, {
NETWORKING => "yes",
FORWARD_IPV4 => "false",
- HOSTNAME => "localhost.localdomain",
DOMAINNAME => "localdomain",
+ DHCP => 1,
+ ZEROCONF => 1,
});
1;
}
@@ -497,10 +498,10 @@ sub configureNetwork2 {
write_conf("$etc/sysconfig/network", $netc);
write_resolv_conf("$etc/resolv.conf", $netc);
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", "localhost", "127.0.0.1");
- add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf);
- ($netc->{DHCP} || grep { $_->{BOOTPROTO} =~ /^(dhcp)$/ } values %$intf) && $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client');
+ $netc->{DHCP} && $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client');
$netc->{ZEROCONF} && $in->do_pkgs->install(qw(tmdns zcip)) and write_zeroconf('/etc/tmdns.conf', $netc->{ZEROCONF_HOSTNAME});
any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $in->do_pkgs->install('pump');