pping support for IPv6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6448 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
26f9880bbf
commit
b38f0378a5
@ -130,7 +130,21 @@ foreach my $interf (@interfaces) {
|
||||
|
||||
sub fping_pping {
|
||||
my $nodes = shift;
|
||||
open (FPING, "fping ".join(' ',@$nodes). " 2>&1 |") or die("Cannot open fping pipe: $!");
|
||||
my $master = xCAT::Utils->get_site_Master();
|
||||
my $masterip = xCAT::NetworkUtils->getipaddr($master);
|
||||
if ($masterip =~ /:/) #IPv6, needs fping6 support
|
||||
{
|
||||
if (!-x '/usr/bin/fping6')
|
||||
{
|
||||
print "fping6 is not availabe for IPv6 ping.\n";
|
||||
exit 1;
|
||||
}
|
||||
open (FPING, "fping6 ".join(' ',@$nodes). " 2>&1 |") or die("Cannot open fping pipe: $!");
|
||||
}
|
||||
else
|
||||
{
|
||||
open (FPING, "fping ".join(' ',@$nodes). " 2>&1 |") or die("Cannot open fping pipe: $!");
|
||||
}
|
||||
while (<FPING>) {
|
||||
if ($_ =~ /is unreachable/) {
|
||||
s/ is unreachable/: noping/;
|
||||
|
Loading…
Reference in New Issue
Block a user