Pass what storage ID is being used to vzdump hook scripts

Signed-off-by: Mark Casey <markc@unifiedgroup.com>
This commit is contained in:
Local User 2013-09-10 12:40:10 -05:00 committed by Dietmar Maurer
parent d81a44e8e3
commit 5d7aff710e
2 changed files with 4 additions and 2 deletions

View File

@ -646,7 +646,7 @@ sub run_hook_script {
local %ENV;
foreach my $ek (qw(vmtype dumpdir hostname tarfile logfile)) {
foreach my $ek (qw(vmtype dumpdir hostname tarfile logfile storeid)) {
$ENV{uc($ek)} = $task->{$ek} if $task->{$ek};
}
@ -764,7 +764,7 @@ sub exec_backup_task {
die "unable to create log file '$tmplog'";
$task->{dumpdir} = $opts->{dumpdir};
$task->{storeid} = $opts->{storage};
$task->{tmplog} = $tmplog;
unlink $logfile;

View File

@ -29,6 +29,8 @@ if ($phase eq 'job-start' ||
my $dumpdir = $ENV{DUMPDIR};
my $storeid = $ENV{STOREID};
my $hostname = $ENV{HOSTNAME};
# tarfile is only available in phase 'backup-end'