From a23e9a36a19343824790bc2f73f1e72c7cfc592a Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Fri, 26 Dec 2008 09:14:49 +0000 Subject: [PATCH] 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 --- OpenSim/Framework/ConfigurationMember.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs index bbfe28d85b..7a5e6b2225 100644 --- a/OpenSim/Framework/ConfigurationMember.cs +++ b/OpenSim/Framework/ConfigurationMember.cs @@ -285,6 +285,11 @@ namespace OpenSim.Framework console_result = attribute; } + // if the first character is a "$", assume it's the name + // of an environment variable and substitute with the value of that variable + if (console_result.StartsWith("$")) + console_result = System.Environment.GetEnvironmentVariable(console_result.Substring(1)); + switch (configOption.configurationType) { case ConfigurationOption.ConfigurationTypes.TYPE_STRING: