mirror of
git://git.proxmox.com/git/pve-zsync.git
synced 2025-01-03 09:17:37 +03:00
fix #1004 adapt regex to new schema
This commit is contained in:
parent
51509434a5
commit
e5f52a63a8
14
pve-zsync
14
pve-zsync
@ -763,9 +763,17 @@ sub parse_disks {
|
|||||||
|
|
||||||
my $disk = undef;
|
my $disk = undef;
|
||||||
my $stor = undef;
|
my $stor = undef;
|
||||||
if($line =~ m/^(?:((?:virtio|ide|scsi|sata|mp)\d+)|rootfs): ([^:]+:)([A-Za-z0-9\-]+),(.*)$/) {
|
if($line =~ m/^(?:(?:(?:virtio|ide|scsi|sata|mp)\d+)|rootfs): (.*)$/) {
|
||||||
$disk = $3;
|
my @parameter = split(/,/,$1);
|
||||||
$stor = $2;
|
|
||||||
|
foreach my $opt (@parameter) {
|
||||||
|
if ($opt =~ m/^(?:file=|volume=)?([^:]+:)([A-Za-z0-9\-]+)$/){
|
||||||
|
$disk = $2;
|
||||||
|
$stor = $1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print "Disk: \"$line\" will not include in pve-sync\n" if $get_err || $error;
|
print "Disk: \"$line\" will not include in pve-sync\n" if $get_err || $error;
|
||||||
next;
|
next;
|
||||||
|
Loading…
Reference in New Issue
Block a user