From 09a616e1ea0cc1927b7ed94d646a91be9a7b435f Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 23 Jan 2008 23:32:19 +0000 Subject: * 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. --- OpenSim/Framework/Util.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'OpenSim/Framework') 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 // 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 ""; + } + + } } } -- cgit v1.1