Skip to content

Commit

Permalink
Merge pull request #2003 from n-st/freebsd-distro-field
Browse files Browse the repository at this point in the history
Query the distro script for FreeBSD systems
  • Loading branch information
f0o committed Sep 27, 2015
2 parents fc25b0d + 41fefbe commit a97aa85
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion includes/polling/os/unix.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,19 @@
else {
$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") {
list(,,$version,,,$features,,$hardware) = explode (" ", $poll_device['sysDescr']);
Expand Down

0 comments on commit a97aa85

Please sign in to comment.