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:
Adam Amstrong
2010-02-17 18:12:55 +00:00
parent 09e22b2f63
commit c270949d61
3 changed files with 18 additions and 1 deletions

View 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"; }
}
}
?>

View File

@@ -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");

View File

@@ -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";