* Added ReadEtcIssue to Util

* If you have Debian running, you should get a platform line that says, 'Found Debian!' when starting up your sim.
* If someone running Debian will confirm this does occur, that would be most helpful.
ThreadPoolClientBranch
Teravus Ovares 2008-01-23 23:32:19 +00:00
parent adf05e682e
commit 09a616e1ea
2 changed files with 26 additions and 6 deletions

View File

@ -439,5 +439,27 @@ namespace OpenSim.Framework
// Truncate string before first end-of-line character found // Truncate string before first end-of-line character found
return input.Substring(0, clip); return input.Substring(0, clip);
} }
/// <summary>
/// returns the contents of /etc/issue on Unix Systems
/// Use this for where it's absolutely necessary to implement platform specific stuff
/// ( like the ODE library :P
/// </summary>
/// <returns></returns>
public static string ReadEtcIssue()
{
try
{
StreamReader sr = new StreamReader("/etc/issue.net");
string issue = sr.ReadToEnd();
sr.Close();
return issue;
}
catch (System.Exception)
{
return "";
}
}
} }
} }

View File

@ -282,14 +282,12 @@ namespace OpenSim.Region.Environment.Scenes
m_statsReporter.OnSendStatsResult += SendSimStatsPackets; m_statsReporter.OnSendStatsResult += SendSimStatsPackets;
MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.Platform.ToString()); MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.Platform.ToString());
MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.ToString()); MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.ToString());
try string etcreturn = Util.ReadEtcIssue();
if (etcreturn.Contains("Debian"))
{ {
MainLog.Instance.Verbose("PLATRORM", "TERM:" + System.Environment.GetEnvironmentVariable("TERM")); MainLog.Instance.Verbose("PLATFORM", "Found Debian!");
}
catch (System.Exception)
{
MainLog.Instance.Verbose("PLATFORM", "No TERM Environment Variable");
} }
} }
#endregion #endregion