]> git.proxmox.com Git - pve-manager.git/commitdiff
bump version to 3.1-11
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 13 Sep 2013 04:53:03 +0000 (06:53 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 13 Sep 2013 04:55:55 +0000 (06:55 +0200)
vzdump: fix hook script environment

PVE/VZDump.pm
debian/changelog.Debian
defines.mk
vzdump-hook-script.pl

index 0bef3fdf420bf716475d5205e8975964b9a0793d..339bdbd5f12daf63294e78b1c49b7964750cdda2 100644 (file)
@@ -646,7 +646,11 @@ sub run_hook_script {
 
     local %ENV;
 
-    foreach my $ek (qw(vmtype dumpdir hostname tarfile logfile storeid)) {
+    # set immutable opts directly (so they are available in all phases)
+    $ENV{STOREID} = $opts->{storage} if $opts->{storage};
+    $ENV{DUMPDIR} = $opts->{dumpdir} if $opts->{dumpdir};
+
+    foreach my $ek (qw(vmtype hostname tarfile logfile)) {
        $ENV{uc($ek)} = $task->{$ek} if $task->{$ek};
     }
 
index 277c4f3e735f9c3035733fbada7a80665be60bdb..49fe5fa5a1a86573598f3bd91b5c1666930a620a 100644 (file)
@@ -1,3 +1,9 @@
+pve-manager (3.1-11) unstable; urgency=low
+
+  * vzdump: fix hook script environment for job-* phase
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 13 Sep 2013 06:55:30 +0200
+
 pve-manager (3.1-10) unstable; urgency=low
 
   * vzdump: pass storage ID to hook scripts
index b1635093e07148a8c51562f1d4123eca4ad5a486..995aea7db0f8aa27bc49a63aa690ad6f41518fe1 100644 (file)
@@ -2,7 +2,7 @@ RELEASE=3.1
 
 VERSION=3.1
 PACKAGE=pve-manager
-PACKAGERELEASE=10
+PACKAGERELEASE=11
 
 BINDIR=${DESTDIR}/usr/bin
 PERLLIBDIR=${DESTDIR}/usr/share/perl5
index b345677ceed290d7e2bdd8f0f5635d2875fa597e..b03fdc2dff4c1404d060e7d405cb80ade345b06c 100755 (executable)
@@ -12,6 +12,12 @@ if ($phase eq 'job-start' ||
     $phase eq 'job-end'  || 
     $phase eq 'job-abort') { 
 
+    my $dumpdir = $ENV{DUMPDIR};
+
+    my $storeid = $ENV{STOREID};
+
+    print "HOOK-ENV: dumpdir=$dumpdir;storeid=$storeid\n";
+
     # do what you want 
 
 } elsif ($phase eq 'backup-start' || 
@@ -39,7 +45,7 @@ if ($phase eq 'job-start' ||
     # logfile is only available in phase 'log-end'
     my $logfile = $ENV{LOGFILE}; 
 
-    print "HOOK-ENV: vmtype=$vmtype;dumpdir=$dumpdir;hostname=$hostname;tarfile=$tarfile;logfile=$logfile\n";
+    print "HOOK-ENV: vmtype=$vmtype;dumpdir=$dumpdir;storeid=$storeid;hostname=$hostname;tarfile=$tarfile;logfile=$logfile\n";
 
     # example: copy resulting backup file to another host using scp
     if ($phase eq 'backup-end') {