]> git.proxmox.com Git - pve-manager-legacy.git/commit
vzdump: set task mode early to fix a warning
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 18 Aug 2016 07:35:00 +0000 (09:35 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 19 Aug 2016 11:54:38 +0000 (13:54 +0200)
commit0d0e663f4e2d27f90d1fe2d90df2aa9851ea41b1
treed09b1cee2be93ab549ea34aa8b54786b7f3a4c45
parent192f1ad2827c895bfd91465dfa4d3537ce02e9d2
vzdump: set task mode early to fix a warning

when a vzdump script is set and the backup fails early (eg.
when exceeding the number of backups) run_hook_script()
showed an uninitialized value error trying to use
$task->{mode} which is set only after prepare() was called.

This sets $task->{mode} early, still updated later to $stop
if !$running, and changes the condition for whether
cleanup() should be called to not use $task->{mode} (which
makes no real sense anyway) to using the $cleanup hash like
the rest of the code.
PVE/VZDump.pm