diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 191205bee3..5bfd8e10e2 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -439,5 +439,27 @@ namespace OpenSim.Framework // Truncate string before first end-of-line character found return input.Substring(0, clip); } + + /// + /// 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 + /// + /// + public static string ReadEtcIssue() + { + try + { + StreamReader sr = new StreamReader("/etc/issue.net"); + string issue = sr.ReadToEnd(); + sr.Close(); + return issue; + } + catch (System.Exception) + { + return ""; + } + + } } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 52d08229ee..c1c6fe9f79 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -282,14 +282,12 @@ namespace OpenSim.Region.Environment.Scenes m_statsReporter.OnSendStatsResult += SendSimStatsPackets; MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.Platform.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")); - } - catch (System.Exception) - { - MainLog.Instance.Verbose("PLATFORM", "No TERM Environment Variable"); + MainLog.Instance.Verbose("PLATFORM", "Found Debian!"); } + } #endregion