add line to "lowercase" os types on discovery (fix for old versions)

git-svn-id: http://www.observium.org/svn/observer/trunk@865 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-02-16 00:38:05 +00:00
parent ceaa0794fe
commit 60062de01d
3 changed files with 9 additions and 1 deletions

View File

@@ -81,7 +81,12 @@ while ($device = mysql_fetch_array($device_query)) {
foreach ($devices as $device)
{
echo($device['hostname'] . " ".$device['device_id']." ".$device['os']." ");
if($device['os'] != strtolower($device['os'])) {
mysql_query("UPDATE `devices` SET `os` = '".strtolower($device['os'])."' WHERE device_id = '".$device['device_id']."'");
$device['os'] = strtolower($device['os']); echo("OS lowercased.");
}
if($os_groups[$device['os']]) {$device['os_group'] = $os_groups[$device['os']]; echo "(".$device['os_group'].")";}
echo("\n");
## Discover OS Changes