]> git.proxmox.com Git - pve-manager.git/commit - PVE/VZDump.pm
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)
commit6acb632a548f5cfe9fbfe13a3fd2184d53175b22
treebd270abf2b3b9333ff97872464ff7d72395a6679
parentde7eeaac1c8bb1da27ddabbe8af93024ace3e6dc
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