diff --git a/get-apache.sh b/get-apache.sh index 46ef75d58..c1d1b86a8 100755 --- a/get-apache.sh +++ b/get-apache.sh @@ -39,5 +39,3 @@ $d2 = int($d2); print "$up\n"; print "$server"; - - diff --git a/includes/functions.php b/includes/functions.php index 802a9843b..50bf3a65b 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -570,7 +570,7 @@ function createHost ($host, $community, $snmpver){ $nullhost = '0'; } } - if($nullhost == '0') { + if($nullhost == '0' && $host_os) { $sql = mysql_query("INSERT INTO `devices` (`hostname`, `community`, `os`, `status`) VALUES ('$host', '$community', '$host_os', '1')"); return("Created host : $host ($host_os)"); } else {