diff options
Diffstat (limited to 'perl-install/crypto.pm')
-rw-r--r-- | perl-install/crypto.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm index 60bd216d5..6ca002d0f 100644 --- a/perl-install/crypto.pm +++ b/perl-install/crypto.pm @@ -57,6 +57,9 @@ sub mirrors { #- http://www.linux-mandrake.com/mirrorsfull.list require http; my $f = http::getFile("http://www.linux-mandrake.com/mirrorsfull.list"); + + local $SIG{ALRM} = sub { die "timeout" }; + alarm 60; foreach (<$f>) { my ($arch, $url, $dir) = m|updates([^:]*):ftp://([^/]*)(/\S*)| or next; MDK::Common::System::compat_arch($arch) or @@ -69,6 +72,7 @@ sub mirrors { $mirrors{$url} = [ $land, $dir ]; } http::getFile('/XXX'); #- close connection. + alarm 0; #- now add static mirror (in case of something wrong happened above). add2hash(\%mirrors, \%static_mirrors); |