Fix bug that causes bogus agents to be created if freeipmi isn't installed
If freeipmi isn't installed or problems occur running ipmiping then an agent is created for every address tested.
This commit is contained in:
parent
e943bf0ada
commit
63a580fcfb
|
@ -83,11 +83,13 @@ sub ipmi_ping ($$$) {
|
|||
|
||||
my $res = `$cmd`;
|
||||
|
||||
if ($res =~ /100\.0% packet loss/) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
if ($res =~ / (\d+\.\d+)% packet loss/) {
|
||||
if ($1 ne '100.0') {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub create_ipmi_modules($$$$$$$) {
|
||||
|
|
Loading…
Reference in New Issue