5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-26 10:03:52 +03:00

nfs: add check_connection

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2012-07-18 13:35:01 +02:00 committed by Dietmar Maurer
parent c9eeac0131
commit 4d284721ed

View File

@ -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;