mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* refactor: use the Config class includes/discovery * fix issue with $config variable not accessible in include-dir.inc.php * improved whitespace * Tidy up discovery_by_ip
19 lines
435 B
PHP
19 lines
435 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 OS! : $os\n";
|
|
}
|
|
|
|
update_device_logo($device);
|