summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2003-02-06 15:36:37 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2003-02-06 15:36:37 +0000
commit99bef6674884d6a19d78020ffb688deade4614c2 (patch)
treefe09b08ee836cfd7a76f151465db894c53d9196e /perl-install/network
parente8ed98c26eca5779a4b82633fb2d127b21594129 (diff)
downloaddrakx-99bef6674884d6a19d78020ffb688deade4614c2.tar
drakx-99bef6674884d6a19d78020ffb688deade4614c2.tar.gz
drakx-99bef6674884d6a19d78020ffb688deade4614c2.tar.bz2
drakx-99bef6674884d6a19d78020ffb688deade4614c2.tar.xz
drakx-99bef6674884d6a19d78020ffb688deade4614c2.zip
fix dhcp package installation
fix zeroconf suckiness
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/network.pm8
1 files changed, 5 insertions, 3 deletions
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');