aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Util.cs22
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
2 files changed, 26 insertions, 6 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 191205b..5bfd8e1 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -439,5 +439,27 @@ namespace OpenSim.Framework
439 // Truncate string before first end-of-line character found 439 // Truncate string before first end-of-line character found
440 return input.Substring(0, clip); 440 return input.Substring(0, clip);
441 } 441 }
442
443 /// <summary>
444 /// returns the contents of /etc/issue on Unix Systems
445 /// Use this for where it's absolutely necessary to implement platform specific stuff
446 /// ( like the ODE library :P
447 /// </summary>
448 /// <returns></returns>
449 public static string ReadEtcIssue()
450 {
451 try
452 {
453 StreamReader sr = new StreamReader("/etc/issue.net");
454 string issue = sr.ReadToEnd();
455 sr.Close();
456 return issue;
457 }
458 catch (System.Exception)
459 {
460 return "";
461 }
462
463 }
442 } 464 }
443} 465}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 52d0822..c1c6fe9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -282,14 +282,12 @@ namespace OpenSim.Region.Environment.Scenes
282 m_statsReporter.OnSendStatsResult += SendSimStatsPackets; 282 m_statsReporter.OnSendStatsResult += SendSimStatsPackets;
283 MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.Platform.ToString()); 283 MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.Platform.ToString());
284 MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.ToString()); 284 MainLog.Instance.Verbose("PLATFORM", System.Environment.OSVersion.ToString());
285 try 285 string etcreturn = Util.ReadEtcIssue();
286 { 286 if (etcreturn.Contains("Debian"))
287 MainLog.Instance.Verbose("PLATRORM", "TERM:" + System.Environment.GetEnvironmentVariable("TERM"));
288 }
289 catch (System.Exception)
290 { 287 {
291 MainLog.Instance.Verbose("PLATFORM", "No TERM Environment Variable"); 288 MainLog.Instance.Verbose("PLATFORM", "Found Debian!");
292 } 289 }
290
293 } 291 }
294 292
295 #endregion 293 #endregion