]> git.proxmox.com Git - pve-manager.git/commitdiff
Pass what storage ID is being used to vzdump hook scripts
authorLocal User <luser@proxdev.unifiedgroup.com>
Tue, 10 Sep 2013 17:40:10 +0000 (12:40 -0500)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Sep 2013 04:20:30 +0000 (06:20 +0200)
Signed-off-by: Mark Casey <markc@unifiedgroup.com>
PVE/VZDump.pm
vzdump-hook-script.pl

index e74993820a80a0d96defe1628cacfb92c5fb6bfc..0bef3fdf420bf716475d5205e8975964b9a0793d 100644 (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;
index 27075dccdd145c641d780a2f4443e3dd2ec339b4..b345677ceed290d7e2bdd8f0f5635d2875fa597e 100755 (executable)
@@ -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'