]> git.proxmox.com Git - pve-zsync.git/commitdiff
check for 'cdrom/none' storage early
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 28 Sep 2015 09:40:04 +0000 (11:40 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 16 Oct 2015 09:00:01 +0000 (11:00 +0200)
pve-zsync

index 9de01d2de0cf34b2879009bdbd4a8f87b81db9c9..33962a6f7f20e160567d2e78e94144c0e762f7ac 100644 (file)
--- a/pve-zsync
+++ b/pve-zsync
@@ -690,6 +690,9 @@ sub parse_disks {
     my $num = 0;
     while ($text && $text =~ s/^(.*?)(\n|$)//) {
        my $line = $1;
+
+       next if $line =~ /cdrom|none/;
+
        my $disk = undef;
        my $stor = undef;
        my $is_disk = $line =~ m/^(virtio|ide|scsi|sata){1}\d+: /;
@@ -707,9 +710,9 @@ sub parse_disks {
            $stor = $2;
        }
 
-       die "disk is not on ZFS Storage\n" if $is_disk && !$disk && $line !~ m/cdrom/;
+       die "disk is not on ZFS Storage\n" if $is_disk && !$disk;
 
-       if($disk && $line !~ m/none/ && $line !~ m/cdrom/ ) {
+       if($disk) {
            my $cmd = "";
            $cmd .= "ssh root\@$ip " if $ip;
            $cmd .= "pvesm path $stor$disk";