From dcc08eb562f046cd91ddfb99063c612eee05c09e Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 10 Aug 2021 10:35:12 -0400 Subject: [PATCH] lxc-download: add LXC version/compat level to user-agent Signed-off-by: Simon Deziel --- templates/lxc-download.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.2