From: Harald Hoyer Date: Mon, 11 Feb 2013 12:56:04 +0000 (+0100) Subject: url-lib/url-lib.sh: add proxy support for curl X-Git-Tag: 026~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ecb9a2d68436fd5772d3be0b024852efabe466b;p=thirdparty%2Fdracut.git url-lib/url-lib.sh: add proxy support for curl --- diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh index 72c865fba..1f8218d0e 100755 --- a/modules.d/45url-lib/url-lib.sh +++ b/modules.d/45url-lib/url-lib.sh @@ -57,6 +57,9 @@ mkdir -p $CURL_HOME curl_args="--location --retry 3 --fail --show-error" getargbool 0 rd.noverifyssl && curl_args="$curl_args --insecure" +proxy=$(getarg proxy=) +[ -n "$proxy" ] && curl_args+="$curl_args --proxy $proxy" + curl_fetch_url() { local url="$1" outloc="$2" echo "$url" > /proc/self/fd/0