[pve-devel] [PATCH manager] Fix #1015: vzdump: send email on early errors

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Jun 6 12:17:06 CEST 2016


On Mon, Jun 06, 2016 at 11:02:20AM +0200, Dominik Csapak wrote:
> >diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
> >index 3101b6a..5ee6f0b 100644
> >--- a/PVE/VZDump.pm
> >+++ b/PVE/VZDump.pm
> >@@ -391,13 +391,21 @@ sub sendmail {
> >      return if (!$ecount && !$err && ($notify eq 'failure'));
> >
> >      my $stat = ($ecount || $err) ? 'backup failed' : 'backup successful';
> >-    $stat .= ": $err" if $err;
> >+    if ($err) {
> >+	if ($err =~ /\n/) {
> 
> should it not be /\n/m for multiline matches?

No need, /m only changes the behavior of ^ and $

> >+	    $stat .= ": multiple probles";
> 
> s/probles/problems/
> 

Ah yes, thanks, sending v2.



More information about the pve-devel mailing list