fix: FreeBSD variants (#4661)

Restore them to one file, improve unit tests by adding FreeBSD to the string
This commit is contained in:
Tony Murray
2016-09-28 20:36:12 -05:00
committed by GitHub
parent a8037d9bdd
commit 714d294222
7 changed files with 12 additions and 19 deletions

View File

@@ -1,5 +1,12 @@
<?php
if (str_contains($sysDescr, 'FreeBSD')) {
// FreeBSD variants, check for specialized distros first
if (str_contains($sysDescr, 'pfSense')) {
$os = 'pfsense';
} elseif (str_contains($sysDescr, 'Voswall')) {
$os = 'voswall';
} elseif (str_contains($sysDescr, 'm0n0wall')) {
$os = 'monowall';
} elseif (str_contains($sysDescr, 'FreeBSD')) {
$os = 'freebsd';
}

View File

@@ -1,5 +0,0 @@
<?php
if (str_contains($sysDescr, 'm0n0wall')) {
$os = 'monowall';
}

View File

@@ -1,5 +0,0 @@
<?php
if (str_contains($sysDescr, 'pfSense')) {
$os = 'pfsense';
}

View File

@@ -1,5 +0,0 @@
<?php
if (str_contains($sysDescr, 'Voswall')) {
$os = 'voswall';
}

View File

@@ -1 +1 @@
1.3.6.1.2.1.1.1.0|4|m0n0wall
1.3.6.1.2.1.1.1.0|4|m0n0wall FreeBSD

View File

@@ -1 +1,2 @@
1.3.6.1.2.1.1.1.0|4|pfSense
1.3.6.1.2.1.1.1.0|4|pfSense 2.3.2-RELEASE pfSense FreeBSD 10.3-RELEASE-p5 amd64
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.12325.1.1.2.1.1

View File

@@ -1 +1 @@
1.3.6.1.2.1.1.1.0|4|Voswall
1.3.6.1.2.1.1.1.0|4|Voswall FreeBSD