From d6c8ec3396892efdcca89818aebf86b4db7a98b2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 4 Nov 2005 11:43:37 +0000 Subject: (is_network_install) use it whenever possible --- perl-install/install_any.pm | 5 ++--- perl-install/install_steps.pm | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index c636f6d09..22ad2e00b 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -290,7 +290,6 @@ sub dont_run_directly_stage2() { readlink("/usr/bin/runinstall2") eq "runinstall2.sh"; } -#- FIXME: use it whenever possible once unfrozen sub is_network_install { my ($o) = @_; member($o->{method}, qw(ftp http nfs)); @@ -1466,7 +1465,7 @@ sub generate_automatic_stage1_params { } @ks = (method => $method, @ks); - if (member($o->{method}, qw(http ftp nfs))) { + if (is_network_install($o)) { if ($ENV{PROXY}) { push @ks, proxy_host => $ENV{PROXY}, proxy_port => $ENV{PROXYPORT}; } @@ -1731,7 +1730,7 @@ sub media_browser { my $hd = $to_text->($_); map { $_ => join('\1', $hd, partition_table::description($_)) } grep { isTrueFS($_) || isOtherAvailableFS($_) } fs::get::hds_fstab($_); } fs::get::hds($all_hds)), - if_(member($::o->{method}, qw(ftp http nfs)) || install_steps::hasNetwork($::o), + if_(is_network_install($::o) || install_steps::hasNetwork($::o), map { $_ => join('\1', N("Network"), translate($_)) } @network_protocols), ); diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index f47cc8c8a..eba9df7a5 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -1003,7 +1003,7 @@ sub network_is_cheap { sub upNetwork { my ($o, $b_pppAvoided) = @_; - member($o->{method}, qw(ftp http nfs)) and return 1; + install_any::is_network_install($o) and return 1; $o->{modules_conf}->write; if (hasNetwork($o)) { if (network_is_cheap($o)) { @@ -1029,7 +1029,7 @@ sub upNetwork { sub downNetwork { my ($o, $costlyOnly) = @_; - $o->{method} eq "ftp" || $o->{method} eq "http" || $o->{method} eq "nfs" and return 1; + install_any::is_network_install($o) and return 1; $o->{modules_conf}->write; if (hasNetwork($o)) { if (!$costlyOnly) { -- cgit v1.2.1