mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Removed code that performs hostname check
This commit is contained in:
@ -285,9 +285,6 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp', $quiet = '0
|
||||
// Test Database Exists
|
||||
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0')
|
||||
{
|
||||
// Test if IP or Hostname
|
||||
if (!(inet_pton($host)))
|
||||
{
|
||||
// Test reachability
|
||||
if ($force_add == 1 || isPingable($host))
|
||||
{
|
||||
@ -372,10 +369,6 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp', $quiet = '0
|
||||
// failed Reachability
|
||||
if($quiet == '0') { print_error("Could not ping $host"); }
|
||||
}
|
||||
} else {
|
||||
// Failed DNS lookup
|
||||
if($quiet == '0') { print_error("$host looks like an IP address, please use FQDN"); }
|
||||
}
|
||||
} else {
|
||||
// found in database
|
||||
if($quiet == '0') { print_error("Already got host $host"); }
|
||||
|
Reference in New Issue
Block a user