mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 08:02:23 +02:00
security fixes and some juniper graphing stuff.
git-svn-id: http://www.observium.org/svn/observer/trunk@245 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ if($argv[1] && $argv[2] && $argv[3]) {
|
||||
list($hostshort) = explode(".", $host);
|
||||
if ( isDomainResolves($argv[1])){
|
||||
if ( isPingable($argv[1])) {
|
||||
if ( mysql_result(mysql_query("SELECT COUNT(*) FROM `devices` WHERE `hostname` = '$host'"), 0) == '0' ) {
|
||||
if ( mysql_result(mysql_query("SELECT COUNT(*) FROM `devices` WHERE `hostname` = '".mres($host)."'"), 0) == '0' ) {
|
||||
$snmphost = trim(`snmpget -Oqv -$snmpver -c $community $host sysName.0 | sed s/\"//g`);
|
||||
if ($snmphost == $host || $hostshort = $host) {
|
||||
$return = createHost ($host, $community, $snmpver);
|
||||
|
||||
Reference in New Issue
Block a user