aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-23 23:32:19 +0000
committerTeravus Ovares2008-01-23 23:32:19 +0000
commit09a616e1ea0cc1927b7ed94d646a91be9a7b435f (patch)
tree845a4c442de79fd65749ac2fbe931bf1d996920b
parent* One more try at specifically identifying Debian from the code. (diff)
downloadopensim-SC_OLD-09a616e1ea0cc1927b7ed94d646a91be9a7b435f.zip
opensim-SC_OLD-09a616e1ea0cc1927b7ed94d646a91be9a7b435f.tar.gz
opensim-SC_OLD-09a616e1ea0cc1927b7ed94d646a91be9a7b435f.tar.bz2
opensim-SC_OLD-09a616e1ea0cc1927b7ed94d646a91be9a7b435f.tar.xz
* 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.
-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