summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-11-04 11:43:37 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-11-04 11:43:37 +0000
commitd6c8ec3396892efdcca89818aebf86b4db7a98b2 (patch)
tree754250868fbc291ef3da52e0fc20313d4609adc1
parenta798005111cd26966def46196afea3264e835bd2 (diff)
downloaddrakx-d6c8ec3396892efdcca89818aebf86b4db7a98b2.tar
drakx-d6c8ec3396892efdcca89818aebf86b4db7a98b2.tar.gz
drakx-d6c8ec3396892efdcca89818aebf86b4db7a98b2.tar.bz2
drakx-d6c8ec3396892efdcca89818aebf86b4db7a98b2.tar.xz
drakx-d6c8ec3396892efdcca89818aebf86b4db7a98b2.zip
(is_network_install) use it whenever possible
-rw-r--r--perl-install/install_any.pm5
-rw-r--r--perl-install/install_steps.pm4
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) {