mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
allow AAAA-only hosts again
git-svn-id: http://www.observium.org/svn/observer/trunk@1875 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+4
-11
@@ -28,12 +28,7 @@ function mac_clean_to_readable($mac)
|
||||
return($r);
|
||||
}
|
||||
|
||||
function zeropad($num)
|
||||
{
|
||||
return (strlen($num) == 1) ? '0'.$num : $num;
|
||||
}
|
||||
|
||||
function zeropad_lineno($num, $length)
|
||||
function zeropad($num, $length = 2)
|
||||
{
|
||||
while (strlen($num) < $length)
|
||||
{
|
||||
@@ -445,6 +440,7 @@ function utime()
|
||||
return $sec + $usec;
|
||||
}
|
||||
|
||||
# FIXME function unused, superseded by rewrites?
|
||||
function fixIOSFeatures($features)
|
||||
{
|
||||
$features = preg_replace("/^PK9S$/", "IP w/SSH LAN Only", $features);
|
||||
@@ -478,9 +474,9 @@ function fixIOSFeatures($features)
|
||||
return $features;
|
||||
}
|
||||
|
||||
# FIXME function unused, superseded by rewrites?
|
||||
function fixIOSHardware($hardware)
|
||||
{
|
||||
|
||||
$hardware = preg_replace("/C([0-9]+)/", "Cisco \\1", $hardware);
|
||||
$hardware = preg_replace("/CISCO([0-9]+)/", "Cisco \\1", $hardware);
|
||||
$hardware = str_replace("cat4000","Cisco Catalyst 4000", $hardware);
|
||||
@@ -495,7 +491,6 @@ function fixIOSHardware($hardware)
|
||||
$hardware = str_replace("C7301", "Cisco 7301", $hardware);
|
||||
$hardware = str_replace("CE500", "Catalyst Express 500", $hardware);
|
||||
return $hardware;
|
||||
|
||||
}
|
||||
|
||||
function createHost($host, $community, $snmpver, $port = 161, $transport = 'udp')
|
||||
@@ -527,9 +522,7 @@ function createHost ($host, $community, $snmpver, $port = 161, $transport = 'udp
|
||||
|
||||
function isDomainResolves($domain)
|
||||
{
|
||||
# duh.
|
||||
#return count(dns_get_record($domain)) != 0;
|
||||
return gethostbyname($domain) != $domain;
|
||||
return (gethostbyname($domain) != $domain | count(dns_get_record($domain)) != 0);
|
||||
}
|
||||
|
||||
function hoststatus($id)
|
||||
|
||||
Reference in New Issue
Block a user