diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/GridServer/Program.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Grid/GridServer/Program.cs b/OpenSim/Grid/GridServer/Program.cs index 9618b85..741a01b 100644 --- a/OpenSim/Grid/GridServer/Program.cs +++ b/OpenSim/Grid/GridServer/Program.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using log4net.Config; | 28 | using log4net.Config; |
29 | using Nini.Config; | ||
29 | 30 | ||
30 | namespace OpenSim.Grid.GridServer | 31 | namespace OpenSim.Grid.GridServer |
31 | { | 32 | { |
@@ -33,10 +34,23 @@ namespace OpenSim.Grid.GridServer | |||
33 | { | 34 | { |
34 | public static void Main(string[] args) | 35 | public static void Main(string[] args) |
35 | { | 36 | { |
37 | ArgvConfigSource argvSource = new ArgvConfigSource(args); | ||
38 | argvSource.AddSwitch("Startup", "console", "c"); | ||
39 | argvSource.AddSwitch("Startup", "xmlfile", "x"); | ||
40 | |||
36 | XmlConfigurator.Configure(); | 41 | XmlConfigurator.Configure(); |
37 | 42 | ||
38 | GridServerBase app = new GridServerBase(); | 43 | GridServerBase app = new GridServerBase(); |
39 | 44 | ||
45 | IConfig startupConfig = argvSource.Configs["Startup"]; | ||
46 | if (startupConfig != null) | ||
47 | { | ||
48 | app.m_consoleType = startupConfig.GetString("console", "local"); | ||
49 | app.m_configFile = startupConfig.GetString("xmlfile", "GridServer_Config.xml"); | ||
50 | } | ||
51 | |||
52 | app.m_configSource = argvSource; | ||
53 | |||
40 | // if (args.Length > 0 && args[0] == "-setuponly") | 54 | // if (args.Length > 0 && args[0] == "-setuponly") |
41 | // { | 55 | // { |
42 | // app.Config(); | 56 | // app.Config(); |