diff --git a/OpenSim/Tools/Configger/ConfigurationLoader.cs b/OpenSim/Tools/Configger/ConfigurationLoader.cs
index 0b6ee9c825..4820e0b828 100644
--- a/OpenSim/Tools/Configger/ConfigurationLoader.cs
+++ b/OpenSim/Tools/Configger/ConfigurationLoader.cs
@@ -64,14 +64,14 @@ namespace OpenSim.Tools.Configger
///
///
/// A configuration that gets passed to modules
- public IConfigSource LoadConfigSettings()
+ public IConfigSource LoadConfigSettings(IConfig startupConfig)
{
bool iniFileExists = false;
List sources = new List();
- string iniFileName = "OpenSim.ini";
- string iniFilePath = Path.Combine(".", iniFileName);
+ string iniFileName = startupConfig.GetString("inifile", Path.Combine(".", "OpenSim.ini"));
+ Console.WriteLine("---> " + iniFileName + " <---");
if (IsUri(iniFileName))
{
@@ -80,10 +80,10 @@ namespace OpenSim.Tools.Configger
}
else
{
- if (File.Exists(iniFilePath))
+ if (File.Exists(iniFileName))
{
- if (!sources.Contains(iniFilePath))
- sources.Add(iniFilePath);
+ if (!sources.Contains(iniFileName))
+ sources.Add(iniFileName);
}
}
diff --git a/OpenSim/Tools/Configger/Main.cs b/OpenSim/Tools/Configger/Main.cs
index 61a12e32a5..d7d918b29c 100644
--- a/OpenSim/Tools/Configger/Main.cs
+++ b/OpenSim/Tools/Configger/Main.cs
@@ -35,15 +35,16 @@ namespace OpenSim.Tools.Configger
public static int Main(string[] args)
{
ArgvConfigSource argvConfig = new ArgvConfigSource(args);
+
argvConfig.AddSwitch("Startup", "format", "f");
+ argvConfig.AddSwitch("Startup", "inifile");
IConfig startupConfig = argvConfig.Configs["Startup"];
string format = startupConfig.GetString("format", "ini");
ConfigurationLoader loader = new ConfigurationLoader();
-
- IConfigSource s = loader.LoadConfigSettings();
+ IConfigSource s = loader.LoadConfigSettings(startupConfig);
if (format == "mysql")
{