refactor: OS discovery files (b) (#4531)

* refactor: OS discovery files (b)

* Switched order

* small if() if() fix
This commit is contained in:
Neil Lathwood
2016-09-23 20:53:55 -05:00
committed by Tony Murray
co-authored by Tony Murray
parent 8a4c99c1d2
commit fedcd8eef0
11 changed files with 51 additions and 50 deletions
@@ -10,14 +10,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (stristr($sysDescr, 'Barracuda Load Balancer') || stristr($sysDescr, 'Barracuda Load Balancer ADC')) {
$os = 'barracudaloadbalancer';
}
if (stristr($sysDescr, 'Barracuda Spam Firewall')) {
$os = 'barracudaspamfirewall';
}
if (stristr($sysDescr, 'Barracuda Firewall')) {
$os = 'barracudangfirewall';
}
if (str_contains($sysDescr, array('Barracuda Load Balancer', 'Barracuda Load Balancer ADC'), true)) {
$os = 'barracudaloadbalancer';
}
@@ -0,0 +1,15 @@
<?php
/*
* LibreNMS Barracuda OS information module
*
* Copyright (c) 2015 Søren Friis Rosiak <[email protected]>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (str_contains($sysDescr, 'Barracuda Firewall', true)) {
$os = 'barracudangfirewall';
}
@@ -0,0 +1,15 @@
<?php
/*
* LibreNMS Barracuda OS information module
*
* Copyright (c) 2015 Søren Friis Rosiak <[email protected]>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (str_contains($sysDescr, 'Barracuda Spam Firewall', true)) {
$os = 'barracudaspamfirewall';
}
+2 -4
View File
@@ -1,7 +1,5 @@
<?php
if (!$os) {
if (stristr($sysDescr, 'bcm963')) {
$os = 'bcm963';
}
if (str_contains($sysDescr, 'bcm963', true)) {
$os = 'bcm963';
}
+2 -4
View File
@@ -1,7 +1,5 @@
<?php
if (!$os) {
if (strstr($sysObjectId, '.1.3.6.1.4.1.3320.1')) {
$os = 'bdcom';
}
if (starts_with($sysObjectId, '.1.3.6.1.4.1.3320.1')) {
$os = 'bdcom';
}
+2 -6
View File
@@ -1,5 +1,4 @@
<?php
/*
* LibreNMS Telco Systems OS discovery module
*
@@ -12,9 +11,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (strstr($sysObjectId, '.1.3.6.1.4.1.738.1.5.100')) {
$os = 'binos';
}
if (starts_with($sysObjectId, '.1.3.6.1.4.1.738.1.5.100')) {
$os = 'binos';
}
+2 -6
View File
@@ -1,5 +1,4 @@
<?php
/*
* LibreNMS Telco Systems OS discovery module
*
@@ -12,9 +11,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (strstr($sysObjectId, '.1.3.6.1.4.1.738.10.5.100')) {
$os = 'binox';
}
if (starts_with($sysObjectId, '.1.3.6.1.4.1.738.10.5.100')) {
$os = 'binox';
}
+3 -4
View File
@@ -9,8 +9,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (!$os) {
if (strpos($sysObjectId, '1.3.6.1.4.1.272.4.201.82.78.79.48') !== false) {
$os = 'bintec-smart';
}
if (starts_with($sysObjectId, '.1.3.6.1.4.1.272.4.201.82.78.79.48')) {
$os = 'bintec-smart';
}
+4 -8
View File
@@ -1,11 +1,7 @@
<?php
if (!$os) {
if (stristr($sysDescr, 'Blade Network Technologies')) {
$os = 'bnt';
}
if (preg_match('/^BNT /', $sysDescr)) {
$os = 'bnt';
}
if (str_contains($sysDescr, 'Blade Network Technologies', true)) {
$os = 'bnt';
} elseif (starts_with($sysDescr, 'BNT ')) {
$os = 'bnt';
}
+2 -4
View File
@@ -1,7 +1,5 @@
<?php
if (!$os) {
if (preg_match('/Brother NC-.*(h|w),/', $sysDescr)) {
$os = 'brother';
}
if (preg_match('/Brother NC-.*(h|w),/', $sysDescr)) {
$os = 'brother';
}
+2 -4
View File
@@ -10,8 +10,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (strstr($sysDescr, 'BUFFALO TeraStation')) {
$os = 'buffalo';
}
if (str_contains($sysDescr, 'BUFFALO TeraStation')) {
$os = 'buffalo';
}