mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* 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.
22 lines
488 B
PHP
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);
|