mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Better Model detection of Old 3Com devices (#10660)
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
|
||||
// Version is the last word in the sysDescr's first line
|
||||
list($version) = explode("\r", substr($device['sysDescr'], (strpos($device['sysDescr'], 'Release') + 8)));
|
||||
if (strpos($device['sysDescr'], 'Software')) {
|
||||
$hardware = str_replace("3Com ", '', substr($device['sysDescr'], 0, strpos($device['sysDescr'], 'Software')));
|
||||
// Version is the last word in the sysDescr's first line
|
||||
list($version) = explode("\n", substr($device['sysDescr'], (strpos($device['sysDescr'], 'Version') + 8)));
|
||||
} else {
|
||||
$hardware = str_replace("3Com ", '', $device['sysDescr']);
|
||||
$version='';
|
||||
}
|
||||
|
Reference in New Issue
Block a user