mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
small fixes and updates
git-svn-id: http://www.observium.org/svn/observer/trunk@541 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
12
includes/discovery/os.inc.php
Normal file
12
includes/discovery/os.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
$os = getHostOS($device);
|
||||
|
||||
if($os != $device['os']) {
|
||||
$sql = mysql_query("UPDATE `devices` SET `os` = '$os' WHERE `device_id` = '".$device['device_id']."'");
|
||||
echo("Changed OS! : $os\n");
|
||||
$eventlog = mysql_query("INSERT INTO eventlog (host, interface, datetime, message) VALUES ('" . $device['device_id'] . "', NULL, NOW(), 'Device OS changed ".$device['os']." => $os')");
|
||||
$device['os'] = $os;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user