# HG changeset patch # User "Yann E. MORIN" # Date 1315576139 -7200 # Node ID 95ad28b9dea6beffc25ed08e00a1059071c27552 # Parent 2a44af825e60ef344df6bcd26ad1a6360b5b2ad9 scripts/functions: only use passive FTP Virtually all FTP server available on-line support passive FTP. At least, this is the case for the servers crosstool-NG needs to connect to. Signed-off-by: "Yann E. MORIN" diff -r 2a44af825e60 -r 95ad28b9dea6 scripts/functions --- a/scripts/functions Fri Sep 09 15:34:04 2011 +0200 +++ b/scripts/functions Fri Sep 09 15:48:59 2011 +0200 @@ -448,8 +448,6 @@ # Remove potential left-over from a previous run rm -f "${tmp}" - # Some (very old!) FTP server might not support the passive mode, thus - # retry without. # We also retry a few times, in case there is a transient error (eg. behind # a dynamic IP that changes during the transfer...) # With automated download as we are doing, it can be very dangerous to @@ -459,10 +457,14 @@ # not easy to detect them, so force a global ${CT_CONNECT_TIMEOUT}-second # timeout. # For curl, no good progress indicator is available. So, be silent. - if CT_DoExecLog ALL curl --ftp-pasv --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \ - || CT_DoExecLog ALL curl --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \ - ; then - # One of them succeeded, good! + if CT_DoExecLog ALL curl --ftp-pasv \ + --retry 3 \ + --connect-timeout ${CT_CONNECT_TIMEOUT} \ + --location --fail --silent \ + --output "${tmp}" \ + "${url}" + then + # Success, we got it, good! mv "${tmp}" "${dest}" else # Woops...