mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-09-04 05:44:23 +03:00
nfs: add check_connection
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
c9eeac0131
commit
4d284721ed
@@ -162,4 +162,12 @@ sub deactivate_storage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub check_connection {
|
||||||
|
my ($class, $storeid, $scfg) = @_;
|
||||||
|
|
||||||
|
my $server = $scfg->{server};
|
||||||
|
my $p = Net::Ping->new();
|
||||||
|
return $p->ping($server, 2);
|
||||||
|
|
||||||
|
}
|
||||||
1;
|
1;
|
||||||
|
Reference in New Issue
Block a user