From 059db45e57357aeb9e998c80b45d7434aa3b6ac0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 28 Nov 2003 15:28:25 +0000 Subject: (configureNetwork2) do not install package or rewrite config files in testing mode --- perl-install/network/network.pm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'perl-install/network/network.pm') diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index f8f82604e..fdc233181 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -548,19 +548,20 @@ sub easy_dhcp { sub configureNetwork2 { my ($in, $prefix, $netc, $intf) = @_; my $etc = "$prefix/etc"; - - $netc->{wireless_eth} and $in->do_pkgs->install(qw(wireless-tools)); - 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", "localhost", "127.0.0.1"); - - any { $_->{BOOTPROTO} eq "dhcp" } values %$intf and $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client'); - $in->do_pkgs->install(qw(tmdns)) if !$in->do_pkgs->is_installed('bind'); - $in->do_pkgs->install(qw(zcip)); - $netc->{ZEROCONF_HOSTNAME} and write_zeroconf("$etc/tmdns.conf", $netc->{ZEROCONF_HOSTNAME}); - any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $in->do_pkgs->install('pump'); + if (!$::testing) { + $netc->{wireless_eth} and $in->do_pkgs->install(qw(wireless-tools)); + 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", "localhost", "127.0.0.1"); + + any { $_->{BOOTPROTO} eq "dhcp" } values %$intf and $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client'); + $in->do_pkgs->install(qw(tmdns)) if !$in->do_pkgs->is_installed('bind'); + $in->do_pkgs->install(qw(zcip)); + $netc->{ZEROCONF_HOSTNAME} and write_zeroconf("$etc/tmdns.conf", $netc->{ZEROCONF_HOSTNAME}); + any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $in->do_pkgs->install('pump'); + } proxy_configure($::o->{miscellaneous}); } -- cgit v1.2.1