From 203017f5540f801c25f8345dd8ca30f0bc4de2f8 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 22 May 2008 00:32:04 +0000
Subject: * Refactor: Move enhancement of version string with operating system
information from Scene to OpenSimMain * This also means the operating system
info will show up in the region console (and hence the logs)
---
OpenSim/Region/Application/OpenSimMain.cs | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Application')
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 4031634..eb44dca 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -346,12 +346,11 @@ namespace OpenSim
}
///
- /// Update the version string with extra information if it's available.
- /// This currently means adding a subversion number if the root .svn/entries file is present.
+ /// Enhance the version string with extra information if it's available.
///
- protected void updateAvailableVersionInformation()
+ protected void enhanceVersionInformation()
{
- // Set BuildVersion String for Show version command
+ // Add subversion revision information if available
string svnFileName = "../.svn/entries";
string inputLine;
int strcmp;
@@ -380,7 +379,25 @@ namespace OpenSim
if (!string.IsNullOrEmpty(buildVersion))
{
VersionInfo.Version += ", SVN build r" + buildVersion;
+ }
+
+ // Add operating system information if available
+ string OSString = "";
+
+ if (System.Environment.OSVersion.Platform != PlatformID.Unix)
+ {
+ OSString = System.Environment.OSVersion.ToString();
}
+ else
+ {
+ OSString = Util.ReadEtcIssue();
+ }
+ if (OSString.Length > 45)
+ {
+ OSString = OSString.Substring(0, 45);
+ }
+
+ VersionInfo.Version += " on " + OSString;
}
///
@@ -388,7 +405,8 @@ namespace OpenSim
///
protected void InternalStartUp()
{
- updateAvailableVersionInformation();
+ enhanceVersionInformation();
+
m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n");
m_stats = StatsManager.StartCollectingSimExtraStats();
--
cgit v1.1