From d911fb62181f1f8b6bf2ca500b8838410615055b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Dec 2003 10:16:44 +0000 Subject: - use do_pkgs->ensure_is_installed instead of do_pkgs->install where it's easy to do so - do_pkgs->install won't do anything when $::testing we need a ensure_are_installed we also need to share more package pkgs_interactive code which is hosted in install_any and standalone --- perl-install/network/network.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install/network/network.pm') diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 4f9dcfbe9..15109a9f1 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -549,7 +549,7 @@ sub configureNetwork2 { my ($in, $prefix, $netc, $intf) = @_; my $etc = "$prefix/etc"; if (!$::testing) { - $netc->{wireless_eth} and $in->do_pkgs->install(qw(wireless-tools)); + $netc->{wireless_eth} and $in->do_pkgs->ensure_is_installed('wireless-tools', '/sbin/iwconfig', 'auto'); 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; @@ -557,8 +557,8 @@ sub configureNetwork2 { 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)); + $in->do_pkgs->ensure_is_installed('tmdns', '/sbin/tmdns', 'auto') if !$in->do_pkgs->is_installed('bind'); + $in->do_pkgs->ensure_is_installed('zcip', '/sbin/zcip', 'auto'); $netc->{ZEROCONF_HOSTNAME} and write_zeroconf("$etc/tmdns.conf", $netc->{ZEROCONF_HOSTNAME}); any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $in->do_pkgs->install('pump'); } -- cgit v1.2.1