From: Simon Deziel Date: Tue, 10 Aug 2021 14:35:12 +0000 (-0400) Subject: lxc-download: add LXC version/compat level to user-agent X-Git-Tag: lxc-5.0.0~117^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3928%2Fhead;p=thirdparty%2Flxc.git lxc-download: add LXC version/compat level to user-agent Signed-off-by: Simon Deziel --- diff --git a/templates/lxc-download.in b/templates/lxc-download.in index b140d86f9..ebec0b487 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -86,8 +86,8 @@ wget_wrapper() { } download_file() { - if ! wget_wrapper -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then - if ! wget_wrapper -T 30 -q "http://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then + if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then + if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "http://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then if [ "$3" = "noexit" ]; then return 1 else