diff options
author | Dahlia Trimble | 2008-12-26 09:14:49 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-12-26 09:14:49 +0000 |
commit | a23e9a36a19343824790bc2f73f1e72c7cfc592a (patch) | |
tree | da03d50fc730bfd1c51c191adfb9b6aa6dc4a3bb | |
parent | Add a few forgotten fields to interregion data (diff) | |
download | opensim-SC-a23e9a36a19343824790bc2f73f1e72c7cfc592a.zip opensim-SC-a23e9a36a19343824790bc2f73f1e72c7cfc592a.tar.gz opensim-SC-a23e9a36a19343824790bc2f73f1e72c7cfc592a.tar.bz2 opensim-SC-a23e9a36a19343824790bc2f73f1e72c7cfc592a.tar.xz |
Substitutes the value of an environment variable if the value of a region configuration variable begins with a "$" character. Should be useful when moving region configs between hosts
-rw-r--r-- | OpenSim/Framework/ConfigurationMember.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs index bbfe28d..7a5e6b2 100644 --- a/OpenSim/Framework/ConfigurationMember.cs +++ b/OpenSim/Framework/ConfigurationMember.cs | |||
@@ -285,6 +285,11 @@ namespace OpenSim.Framework | |||
285 | console_result = attribute; | 285 | console_result = attribute; |
286 | } | 286 | } |
287 | 287 | ||
288 | // if the first character is a "$", assume it's the name | ||
289 | // of an environment variable and substitute with the value of that variable | ||
290 | if (console_result.StartsWith("$")) | ||
291 | console_result = System.Environment.GetEnvironmentVariable(console_result.Substring(1)); | ||
292 | |||
288 | switch (configOption.configurationType) | 293 | switch (configOption.configurationType) |
289 | { | 294 | { |
290 | case ConfigurationOption.ConfigurationTypes.TYPE_STRING: | 295 | case ConfigurationOption.ConfigurationTypes.TYPE_STRING: |