diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-28 15:28:25 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-28 15:28:25 +0000 |
commit | 059db45e57357aeb9e998c80b45d7434aa3b6ac0 (patch) | |
tree | e005f788653f3f65f5fc343c6fbc795044cc858e | |
parent | 04c6ff92abcab16e838b2632e249b384d4bdc1fd (diff) | |
download | drakx-059db45e57357aeb9e998c80b45d7434aa3b6ac0.tar drakx-059db45e57357aeb9e998c80b45d7434aa3b6ac0.tar.gz drakx-059db45e57357aeb9e998c80b45d7434aa3b6ac0.tar.bz2 drakx-059db45e57357aeb9e998c80b45d7434aa3b6ac0.tar.xz drakx-059db45e57357aeb9e998c80b45d7434aa3b6ac0.zip |
(configureNetwork2) do not install package or rewrite config files in
testing mode
-rw-r--r-- | perl-install/network/network.pm | 27 |
1 files changed, 14 insertions, 13 deletions
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}); } |