mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Query the distro script at SNMP OID .1.3.6.1.4.1.2021.7890.1 for FreeBSD systems (like it is already done for Linux systems)
This commit is contained in:
@@ -78,7 +78,19 @@ elseif ($device['os'] == "freebsd") {
|
|||||||
else {
|
else {
|
||||||
$hardware = "i386";
|
$hardware = "i386";
|
||||||
}
|
}
|
||||||
$features = "GENERIC";
|
|
||||||
|
# Distro "extend" support
|
||||||
|
$features = snmp_get($device, ".1.3.6.1.4.1.2021.7890.1.3.1.1.6.100.105.115.116.114.111", "-Oqv", "UCD-SNMP-MIB");
|
||||||
|
$features = str_replace("\"", "", $features);
|
||||||
|
|
||||||
|
if (!$features) { # No "extend" support, try "exec" support
|
||||||
|
$features = snmp_get($device, ".1.3.6.1.4.1.2021.7890.1.101.1", "-Oqv", "UCD-SNMP-MIB");
|
||||||
|
$features = str_replace("\"", "", $features);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$features) {
|
||||||
|
$features = 'GENERIC';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif ($device['os'] == "dragonfly") {
|
elseif ($device['os'] == "dragonfly") {
|
||||||
list(,,$version,,,$features,,$hardware) = explode (" ", $poll_device['sysDescr']);
|
list(,,$version,,,$features,,$hardware) = explode (" ", $poll_device['sysDescr']);
|
||||||
|
|||||||
Reference in New Issue
Block a user