mirror of
git://git.proxmox.com/git/pve-zsync.git
synced 2025-03-11 20:58:42 +03:00
remove now unnecessary if($disk)
This commit is contained in:
parent
4f865f2805
commit
b52d13b356
38
pve-zsync
38
pve-zsync
@ -703,29 +703,27 @@ sub parse_disks {
|
||||
die "disk is not on ZFS Storage\n";
|
||||
}
|
||||
|
||||
if($disk) {
|
||||
my $cmd = "";
|
||||
$cmd .= "ssh root\@$ip " if $ip;
|
||||
$cmd .= "pvesm path $stor$disk";
|
||||
my $path = run_cmd($cmd);
|
||||
my $cmd = "";
|
||||
$cmd .= "ssh root\@$ip " if $ip;
|
||||
$cmd .= "pvesm path $stor$disk";
|
||||
my $path = run_cmd($cmd);
|
||||
|
||||
if ($path =~ m/^\/dev\/zvol\/(\w+).*(\/$disk)$/) {
|
||||
if ($path =~ m/^\/dev\/zvol\/(\w+).*(\/$disk)$/) {
|
||||
|
||||
my @array = split('/', $1);
|
||||
$disks->{$num}->{pool} = pop(@array);
|
||||
$disks->{$num}->{all} = $disks->{$num}->{pool};
|
||||
if (0 < @array) {
|
||||
$disks->{$num}->{path} = join('/', @array);
|
||||
$disks->{$num}->{all} .= "\/$disks->{$num}->{path}";
|
||||
}
|
||||
$disks->{$num}->{last_part} = $disk;
|
||||
$disks->{$num}->{all} .= "\/$disk";
|
||||
|
||||
$num++;
|
||||
|
||||
} else {
|
||||
die "ERROR: in path\n";
|
||||
my @array = split('/', $1);
|
||||
$disks->{$num}->{pool} = pop(@array);
|
||||
$disks->{$num}->{all} = $disks->{$num}->{pool};
|
||||
if (0 < @array) {
|
||||
$disks->{$num}->{path} = join('/', @array);
|
||||
$disks->{$num}->{all} .= "\/$disks->{$num}->{path}";
|
||||
}
|
||||
$disks->{$num}->{last_part} = $disk;
|
||||
$disks->{$num}->{all} .= "\/$disk";
|
||||
|
||||
$num++;
|
||||
|
||||
} else {
|
||||
die "ERROR: in path\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user