From 914f531f3955e8416e6098c094a1356a0e7c9d81 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 18 Sep 2012 16:29:42 +0200 Subject: [PATCH] 45url-lib/url-lib.sh: give info what URL curl failed to download https://bugzilla.redhat.com/show_bug.cgi?id=857836 Also allow self signed Certs and use "--insecure". https://bugzilla.redhat.com/show_bug.cgi?id=852229 --- modules.d/45url-lib/url-lib.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh index e9ece70a1..a8069efad 100755 --- a/modules.d/45url-lib/url-lib.sh +++ b/modules.d/45url-lib/url-lib.sh @@ -54,7 +54,7 @@ add_url_handler() { export CURL_HOME="/run/initramfs/url-lib" mkdir -p $CURL_HOME -curl_args="--location --retry 3 --fail --show-error" +curl_args="--location --retry 3 --fail --show-error --insecure" curl_fetch_url() { local url="$1" outloc="$2" @@ -66,7 +66,10 @@ curl_fetch_url() { ( cd "$outdir"; curl $curl_args --remote-name "$url" || return $? ) outloc="$outdir/$(ls -A $outdir)" fi - [ -f "$outloc" ] || return 253 + if ! [ -f "$outloc" ]; then + warn "Downloading '$url' failed!" + return 253 + fi if [ -z "$2" ]; then echo "$outloc" ; fi } add_url_handler curl_fetch_url http https ftp -- 2.47.3