mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
There were two or more separate $device arrays during discovery. When one was updated, others were not. Combine those all. Make sure the new os is loaded if the os changed.
17 lines
415 B
PHP
17 lines
415 B
PHP
<?php
|
|
|
|
$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 (!isset($config['os'][$device['os']])) {
|
|
load_os($device);
|
|
}
|
|
|
|
echo "Changed OS! : $os\n";
|
|
}
|
|
|
|
update_device_logo($device);
|