aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-23 23:32:19 +0000
committerTeravus Ovares2008-01-23 23:32:19 +0000
commit09a616e1ea0cc1927b7ed94d646a91be9a7b435f (patch)
tree845a4c442de79fd65749ac2fbe931bf1d996920b /OpenSim/Framework/Util.cs
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.
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs22
1 files changed, 22 insertions, 0 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}