[pve-devel] [PATCH manager 2/2] VZDump: add TARFILE to environment for hookscripts
Stoiko Ivanov
s.ivanov at proxmox.com
Tue Jul 14 10:09:19 CEST 2020
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 at 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
More information about the pve-devel
mailing list