Merge pull request #3823 from laf/device-type-discovery

This commit is contained in:
Søren Rosiak
2016-07-21 22:14:00 +02:00
committed by GitHub

View File

@ -103,6 +103,13 @@ function discover_device($device, $options = null) {
}
}
// Set type to a predefined type for the OS if it's not already set
if ($device['type'] == 'unknown' || $device['type'] == '') {
if ($config['os'][$device['os']]['type']) {
$device['type'] = $config['os'][$device['os']]['type'];
}
}
if ($config['os'][$device['os']]['group']) {
$device['os_group'] = $config['os'][$device['os']]['group'];
echo ' (' . $device['os_group'] . ')';
@ -142,13 +149,6 @@ function discover_device($device, $options = null) {
register_mibs($device, $devicemib, "includes/discovery/functions.inc.php");
}
// Set type to a predefined type for the OS if it's not already set
if ($device['type'] == 'unknown' || $device['type'] == '') {
if ($config['os'][$device['os']]['type']) {
$device['type'] = $config['os'][$device['os']]['type'];
}
}
$device_end = microtime(true);
$device_run = ($device_end - $device_start);
$device_time = substr($device_run, 0, 5);