Blame 0033-url-lib-url-lib.sh-add-proxy-support-for-curl.patch

Harald Hoyer fe31f8
From 6ecb9a2d68436fd5772d3be0b024852efabe466b Mon Sep 17 00:00:00 2001
Harald Hoyer fe31f8
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer fe31f8
Date: Mon, 11 Feb 2013 13:56:04 +0100
Harald Hoyer fe31f8
Subject: [PATCH] url-lib/url-lib.sh: add proxy support for curl
Harald Hoyer fe31f8
Harald Hoyer fe31f8
---
Harald Hoyer fe31f8
 modules.d/45url-lib/url-lib.sh | 3 +++
Harald Hoyer fe31f8
 1 file changed, 3 insertions(+)
Harald Hoyer fe31f8
Harald Hoyer fe31f8
diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
Harald Hoyer fe31f8
index 72c865f..1f8218d 100755
Harald Hoyer fe31f8
--- a/modules.d/45url-lib/url-lib.sh
Harald Hoyer fe31f8
+++ b/modules.d/45url-lib/url-lib.sh
Harald Hoyer fe31f8
@@ -57,6 +57,9 @@ mkdir -p $CURL_HOME
Harald Hoyer fe31f8
 curl_args="--location --retry 3 --fail --show-error"
Harald Hoyer fe31f8
 getargbool 0 rd.noverifyssl && curl_args="$curl_args --insecure"
Harald Hoyer fe31f8
 
Harald Hoyer fe31f8
+proxy=$(getarg proxy=)
Harald Hoyer fe31f8
+[ -n "$proxy" ] && curl_args+="$curl_args --proxy $proxy"
Harald Hoyer fe31f8
+
Harald Hoyer fe31f8
 curl_fetch_url() {
Harald Hoyer fe31f8
     local url="$1" outloc="$2"
Harald Hoyer fe31f8
     echo "$url" > /proc/self/fd/0