VZDump: add TARFILE to environment for hookscripts

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>
This commit is contained in:
Stoiko Ivanov 2020-07-14 10:09:19 +02:00 committed by Thomas Lamprecht
parent eecf466937
commit b3dec633d0

View File

@ -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);
}