added fping to all hosts
[pxelator] / lib / PXElator / amt.pm
index 7dc53f9..c283072 100644 (file)
@@ -8,9 +8,9 @@ use Intel::AMT::RemoteControl;
 use Intel::AMT::NetworkAdministration;
 use Data::Dump qw/dump/;
 use Regexp::Common qw/net/;
-use Net::Ping;
 
 use html;
+use ping;
 use CouchDB;
 
 sub info {
@@ -20,9 +20,7 @@ sub info {
 
        $ip ||= $client_ip;
 
-       my $p = Net::Ping->new;
-
-       if ( ! $p->ping( $ip, 0.7 ) ) {
+       if ( ! ping::host( $ip ) ) {
                return "$ip unreachable";
        }