[arch-releng] [PATCH] archiso_pxe_http: curl should follow redirects

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Mon Jul 30 19:38:47 EDT 2012


On 07/30/2012 08:28 AM, Florian Pritz wrote:
> Signed-off-by: Florian Pritz <bluewind at xinu.at>
> ---
> This is actually untested, but since it's the only call to curl and my box
> downloaded the redirect page, I'm pretty sure it will work.
>
>   archiso/hooks/archiso_pxe_http | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/archiso/hooks/archiso_pxe_http b/archiso/hooks/archiso_pxe_http
> index ae56210..32e8ab0 100644
> --- a/archiso/hooks/archiso_pxe_http
> +++ b/archiso/hooks/archiso_pxe_http
> @@ -19,7 +19,7 @@ _curl_get() {
>       local _dst="${2}"
>   
>       msg ":: Downloading '${_url}'"
> -    if ! curl -f -o "/run/archiso/httpspace/${archisobasedir}${_dst}/${_url##*/}" --create-dirs "${_url}"; then
> +    if ! curl -L -f -o "/run/archiso/httpspace/${archisobasedir}${_dst}/${_url##*/}" --create-dirs "${_url}"; then
>           echo "ERROR: Downloading '${_url}'"
>           echo "   Falling back to interactive prompt"
>           echo "   You can try to fix the problem manually, log out when you are finished"
looks safe.


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



More information about the arch-releng mailing list