mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#12124)
This commit is contained in:
@@ -60,20 +60,20 @@ class Programs extends BaseValidation
|
||||
$fping6 = (! is_executable($fping6) && is_executable($fping)) ? "$fping -6" : $fping6;
|
||||
|
||||
$validator->execAsUser("$fping6 ::1 2>&1", $output, $return);
|
||||
$output = implode(" ", $output);
|
||||
$output = implode(' ', $output);
|
||||
|
||||
if ($return === 0 && $output == "::1 is alive") {
|
||||
if ($return === 0 && $output == '::1 is alive') {
|
||||
return; // fping is working
|
||||
}
|
||||
|
||||
if ($output == '::1 address not found') {
|
||||
$validator->warn("fping does not have IPv6 support?!?!");
|
||||
$validator->warn('fping does not have IPv6 support?!?!');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Str::contains($output, '::1 is unreachable') || Str::contains($output, 'Address family not supported')) {
|
||||
$validator->warn("IPv6 is disabled on your server, you will not be able to add IPv6 devices.");
|
||||
$validator->warn('IPv6 is disabled on your server, you will not be able to add IPv6 devices.');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -86,9 +86,9 @@ class Programs extends BaseValidation
|
||||
public function extraFpingChecks(Validator $validator, $cmd)
|
||||
{
|
||||
$validator->execAsUser("$cmd 127.0.0.1 2>&1", $output, $return);
|
||||
$output = implode(" ", $output);
|
||||
$output = implode(' ', $output);
|
||||
|
||||
if ($return === 0 && $output == "127.0.0.1 is alive") {
|
||||
if ($return === 0 && $output == '127.0.0.1 is alive') {
|
||||
return; // fping is working
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user