mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: OS discovery files (b) (#4531)
* refactor: OS discovery files (b) * Switched order * small if() if() fix
This commit is contained in:
committed by
Tony Murray
co-authored by
Tony Murray
parent
8a4c99c1d2
commit
fedcd8eef0
+2
-10
@@ -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';
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (stristr($sysDescr, 'bcm963')) {
|
||||
$os = 'bcm963';
|
||||
}
|
||||
if (str_contains($sysDescr, 'bcm963', true)) {
|
||||
$os = 'bcm963';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user