]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxc-download: add LXC version/compat level to user-agent
authorSimon Deziel <simon.deziel@canonical.com>
Tue, 10 Aug 2021 14:35:12 +0000 (10:35 -0400)
committerSimon Deziel <simon.deziel@canonical.com>
Tue, 10 Aug 2021 14:35:48 +0000 (10:35 -0400)
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
templates/lxc-download.in

index b140d86f9e17f762f751652ec7f75bdb3106949f..ebec0b487d1ad32cd1603680e644669a2771f59c 100644 (file)
@@ -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