Merge pull request #4499 from murrant/fix-swos

fix: swos os discovery fixes #3593
This commit is contained in:
Neil Lathwood
2016-09-20 14:28:09 +01:00
committed by GitHub
2 changed files with 13 additions and 5 deletions

View File

@@ -1,9 +1,7 @@
<?php
if (!$os) {
if (strstr(snmp_get($device, 'SNMPv2-MIB::sysName.0', '-Oqv', ''), 'MikroTik')) {
if (strstr(snmp_get($device, 'SNMPv2-MIB::sysDescr.0', '-Oqv', ''), 'RB260GS')) {
$os = 'swos';
}
if (str_contains($sysDescr, array('RB260GS', 'RB250GS', 'RB260GSP'))) {
if (str_contains(snmp_get($device, 'SNMPv2-MIB::sysName.0', '-Oqv', ''), 'MicroTik')) {
$os = 'swos';
}
}