mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix host adding (oopsie)
git-svn-id: http://www.observium.org/svn/observer/trunk@2439 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
if (!$os)
|
if (!$os)
|
||||||
{
|
{
|
||||||
if (strstr($sysObjectId, ".1.3.6.1.4.1.388")) { $os = "symbol"; }
|
if (strstr($sysObjectId, ".1.3.6.1.4.1.388")) { $os = "symbol"; }
|
||||||
echo "symbol";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -184,10 +184,10 @@ function addHost($host, $community, $snmpver, $port = '161', $transport = 'udp')
|
|||||||
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0')
|
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0')
|
||||||
{
|
{
|
||||||
/// Test DNS lookup
|
/// Test DNS lookup
|
||||||
if (isDomainResolves($argv[1]))
|
if (gethostbyname($host) != $host)
|
||||||
{
|
{
|
||||||
/// Test reachability
|
/// Test reachability
|
||||||
if (isPingable($argv[1]))
|
if (isPingable($host))
|
||||||
{
|
{
|
||||||
$added = 0;
|
$added = 0;
|
||||||
/// try each community from config
|
/// try each community from config
|
||||||
|
Reference in New Issue
Block a user