From: Harald Hoyer Date: Tue, 20 Aug 2013 14:15:17 +0000 (+0200) Subject: url-lib.sh: handle 0-size files with curl X-Git-Tag: 033~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c274467d6a4959b7f451f9a211ffbb38d69b641;p=thirdparty%2Fdracut.git url-lib.sh: handle 0-size files with curl https://bugzilla.redhat.com/show_bug.cgi?id=989133#c9 --- diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh index 34d42ba5d..12df9b4c8 100755 --- a/modules.d/45url-lib/url-lib.sh +++ b/modules.d/45url-lib/url-lib.sh @@ -64,7 +64,7 @@ curl_fetch_url() { local url="$1" outloc="$2" echo "$url" > /proc/self/fd/0 if [ -n "$outloc" ]; then - curl $curl_args --output "$outloc" -- "$url" || return $? + curl $curl_args --output - -- "$url" > "$outloc" || return $? else local outdir="$(mkuniqdir /tmp curl_fetch_url)" ( cd "$outdir"; curl $curl_args --remote-name "$url" || return $? )