[pve-devel] [PATCH v2 manager 08/13] Die if dumpdir and storage are both defined
    Fabian Ebner 
    f.ebner at proxmox.com
       
    Wed Jun 10 13:23:59 CEST 2020
    
    
  
dumpdir will be overwritten if a storage is specified.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
New in v2
 PVE/VZDump.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index bdbf641e..bc4ac751 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -449,7 +449,9 @@ sub new {
     }
 
     if (defined($opts->{storage}) && $opts->{stdout}) {
-	die "unable to use option 'storage' with option 'stdout'\n";
+	die "cannot use options 'storage' and 'stdout' at the same time\n";
+    } elsif (defined($opts->{storage}) && defined($opts->{dumpdir})) {
+	die "cannot use options 'storage' and 'dumpdir' at the same time\n";
     }
 
     if (!$opts->{dumpdir} && !$opts->{storage}) {
-- 
2.20.1
    
    
More information about the pve-devel
mailing list