From 99bef6674884d6a19d78020ffb688deade4614c2 Mon Sep 17 00:00:00 2001 From: Damien Chaumette Date: Thu, 6 Feb 2003 15:36:37 +0000 Subject: fix dhcp package installation fix zeroconf suckiness --- perl-install/network/network.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'perl-install/network') diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 39d65609b..8172a808a 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -4,6 +4,8 @@ package network::network; # $Id$wir #- misc imports #-###################################################################################### +use strict; + use Socket; use common; use detect_devices; @@ -75,8 +77,8 @@ sub write_conf { } sub write_zeroconf { - my ($file, $netc); - my %zeroconf_file = getVarsFromSh($file) or die "$file isn't installed"; + my ($file, $netc) = @_; + my %zeroconf_file = getVarsFromSh($file); $zeroconf_file{hostname} = $netc->{ZEROCONF_HOSTNAME}; setVarsInSh($file, \%zeroconf_file); } @@ -501,7 +503,7 @@ sub configureNetwork2 { add2hosts("$etc/hosts", "localhost", "127.0.0.1"); add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf); - $netc->{DHCP} && $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client'); + ($netc->{DHCP} || grep { $_->{BOOTPROTO} =~ /^(dhcp)$/ } values %$intf) && $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); any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $in->do_pkgs->install('pump'); -- cgit v1.2.1