pping changes the output text of fping from "is active/is unreachable" to ":ping/:noping"
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@434 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f1e93612b3
commit
e7cf67478b
@ -21,7 +21,7 @@ my $interface;
|
||||
GetOptions("interface=s" => \$interface);
|
||||
my $xcathost='localhost:3001';
|
||||
if ($ENV{XCATHOST}) {
|
||||
$xcathost=$ENV{XCATHOST};
|
||||
$xcathost=$ENV{XCATHOST};
|
||||
}
|
||||
|
||||
unless (@ARGV) {
|
||||
@ -74,6 +74,14 @@ if ($interface) {
|
||||
}
|
||||
}
|
||||
|
||||
exec "fping ".join(' ',@nodes). " 2> /dev/null";
|
||||
|
||||
#exec "fping ".join(' ',@nodes). " 2> /dev/null";
|
||||
open (FPING, "fping ".join(' ',@nodes). " 2> /dev/null|") or die("Cannot open fping pipe: $!");
|
||||
while (<FPING>) {
|
||||
if ($_ =~ /is unreachable/) {
|
||||
s/ is unreachable/: noping/;
|
||||
} elsif ($_ =~ /is alive/) {
|
||||
s/ is alive/: ping/;
|
||||
}
|
||||
print $_;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user