Files
librenms-librenms/includes/discovery/os.inc.php
Tony Murray 54b476c769 fix: devices detected as ibmtl or generic (#7618)
* fix: devices detected as ibmtl
Guess at the sysObjectID, please report if you have devices that should be ibmtl and are no longer detected.
Add output of os in discovery.

* Always load all os for discovery.  Should be cached most of the time.
2017-11-03 16:10:24 -05:00

22 lines
488 B
PHP

<?php
use LibreNMS\Config;
$os = getHostOS($device);
if ($os != $device['os']) {
log_event('Device OS changed ' . $device['os'] . " => $os", $device, 'system', 3);
$device['os'] = $os;
$sql = dbUpdate(array('os' => $os), 'devices', 'device_id=?', array($device['device_id']));
if (!Config::has("os.{$device['os']}")) {
load_os($device);
}
echo "Changed ";
}
echo "OS: " . Config::getOsSetting($os, 'text') . " ($os)\n";
update_device_logo($device);