[pve-devel] [PATCH V2 2/2] fix use path as source

Wolfgang Link w.link at proxmox.com
Wed Jun 15 08:10:33 CEST 2016


---
 pve-zsync | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pve-zsync b/pve-zsync
index 4491d1a..b0d5e30 100644
--- a/pve-zsync
+++ b/pve-zsync
@@ -474,11 +474,11 @@ sub init {
 	run_cmd(['ssh-copy-id', '-i', '/root/.ssh/id_rsa.pub', "root\@$ip"]);
     }
 
-    die "Pool $dest->{all} does not exists\n" if check_pool_exists($dest);
+    die "Pool $dest->{all} does not exists\n" if !check_pool_exists($dest);
 
-    my $check = check_pool_exists($source->{path}, $source->{ip}) if !$source->{vmid} && $source->{path};
-
-    die "Pool $source->{path} does not exists\n" if undef($check);
+    if (!defined($source->{vmid})) {
+	die "Pool $source->{all} does not exists\n" if !check_pool_exists($source);
+    }
 
     my $vm_type = vm_exists($source);
     $job->{vm_type} = $vm_type;
-- 
2.1.4





More information about the pve-devel mailing list