diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Util.cs | 22 |
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 | } |