mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
more code cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@2517 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -22,9 +22,9 @@ function external_exec($command)
|
||||
{
|
||||
global $debug;
|
||||
|
||||
if($debug) { echo($command."\n"); }
|
||||
if ($debug) { echo($command."\n"); }
|
||||
$output = shell_exec($command);
|
||||
if($debug) { echo($output."\n"); }
|
||||
if ($debug) { echo($output."\n"); }
|
||||
|
||||
return $output;
|
||||
}
|
||||
@@ -325,6 +325,7 @@ function isSNMPable($device)
|
||||
function isPingable($hostname)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$status = shell_exec($config['fping'] . " $hostname 2>/dev/null");
|
||||
if (strstr($status, "alive"))
|
||||
{
|
||||
@@ -348,6 +349,7 @@ function is_odd($number)
|
||||
function isValidInterface($if)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$if = strtolower($if);
|
||||
$nullintf = 0;
|
||||
foreach ($config['bad_if'] as $bi)
|
||||
@@ -644,7 +646,7 @@ function is_port_valid($port, $device)
|
||||
if (strstr($if, $bi))
|
||||
{
|
||||
$valid = 0;
|
||||
if($debug) { echo("ignored : $bi : $if"); }
|
||||
if ($debug) { echo("ignored : $bi : $if"); }
|
||||
}
|
||||
}
|
||||
if (is_array($config['bad_if_regexp']))
|
||||
@@ -654,7 +656,7 @@ function is_port_valid($port, $device)
|
||||
if (preg_match($bi ."i", $if))
|
||||
{
|
||||
$valid = 0;
|
||||
if($debug) { echo("ignored : $bi : ".$if); }
|
||||
if ($debug) { echo("ignored : $bi : ".$if); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user