mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add solaris/opensolaris basic detection (no real support yet)
git-svn-id: http://www.observium.org/svn/observer/trunk@881 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
12
includes/osdiscovery/discover-solaris.php
Executable file
12
includes/osdiscovery/discover-solaris.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
if(!$os) {
|
||||
if(preg_match("/^SunOS/", $sysDescr))
|
||||
{
|
||||
$os = "solaris";
|
||||
list(,,$version) = explode (" ", $sysDescr);
|
||||
if($version > "5.10") { $os = "opensolaris"; }
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -12,7 +12,7 @@
|
||||
$features = str_replace("(", "", $features);
|
||||
$features = str_replace(")", "", $features);
|
||||
list(,,$hardware) = explode ("$features", $sysDescr);
|
||||
} elseif ($device['os'] == "openbsd") {
|
||||
} elseif ($device['os'] == "openbsd" || $device['os'] == "solaris" || $device['os'] == "opensolaris") {
|
||||
list(,,$version,$features,$hardware) = explode (" ", $sysDescr);
|
||||
$features = str_replace("(", "", $features);
|
||||
$features = str_replace(")", "", $features);
|
||||
@@ -37,5 +37,7 @@
|
||||
if(strpos($hw, "No") !== FALSE) { unset($hw); } else { $hardware = "Dell " . $hw; }
|
||||
}
|
||||
|
||||
echo("$version - $hardware - $features ");
|
||||
|
||||
include("ucd-mib.inc.php");
|
||||
include("hr-mib.inc.php");
|
||||
|
||||
@@ -24,6 +24,7 @@ $os_groups['openbsd'] = "unix";
|
||||
$os_groups['netbsd'] = "unix";
|
||||
$os_groups['dragonfly'] = "unix";
|
||||
$os_groups['solaris'] = "unix";
|
||||
$os_groups['opensolaris'] = "unix";
|
||||
|
||||
$os_groups['iosxe'] = "ios";
|
||||
$os_groups['iosxr'] = "ios";
|
||||
@@ -46,6 +47,8 @@ $os_text['freebsd'] = "FreeBSD";
|
||||
$os_text['openbsd'] = "OpenBSD";
|
||||
$os_text['netbsd'] = "NetBSD";
|
||||
$os_text['dragonflybsd'] = "DragonFlyBSD";
|
||||
$os_text['solaris'] = "Sun Solaris";
|
||||
$os_text['opensolaris'] = "OpenSolaris";
|
||||
$os_text['powerconnect'] = "Dell PowerConnect";
|
||||
$os_text['windows'] = "Microsoft Windows";
|
||||
$os_text['junos'] = "Juniper JUNOS";
|
||||
|
||||
Reference in New Issue
Block a user