public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/2] VZDump: add TARFILE to environment for hookscripts
Date: Tue, 14 Jul 2020 10:09:19 +0200	[thread overview]
Message-ID: <20200714080919.6713-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20200714080919.6713-1-s.ivanov@proxmox.com>

The renaming of tarfile to target in 848cf539e59b4553559b9ff3207a3c5556dc1cc0
can break existing vzdump hook scripts of users.
by setting the TARFILE variable in addition to TARGET the scripts will continue
to work.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 PVE/VZDump.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 601cd56e..6620e997 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -590,6 +590,8 @@ sub run_hook_script {
     foreach my $ek (qw(vmtype hostname target logfile)) {
 	$ENV{uc($ek)} = $task->{$ek} if $task->{$ek};
     }
+    # FIXME: for backwards compatibility - drop with PVE 7.0
+    $ENV{TARFILE} = $task->{target} if $task->{target};
 
     run_command ($logfd, $cmd);
 }
-- 
2.20.1





  parent reply	other threads:[~2020-07-14  8:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  8:09 [pve-devel] [PATCH manager 0/2] readd TARFILE environment variable in VZDump Stoiko Ivanov
2020-07-14  8:09 ` [pve-devel] [PATCH manager 1/2] vzdump-hook-script: rename TARFILE to TARGET Stoiko Ivanov
2020-07-14  8:09 ` Stoiko Ivanov [this message]
2020-07-14  8:31 ` [pve-devel] applied-series: [PATCH manager 0/2] readd TARFILE environment variable in VZDump Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200714080919.6713-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal