diff options
author | Melanie | 2010-09-13 23:17:42 +0100 |
---|---|---|
committer | Melanie | 2010-09-13 23:27:47 +0100 |
commit | 2cf98e77fc331f6032f6eb600139771085629bbf (patch) | |
tree | 2ba00ff3b0f22afd87bcbb964058f81cd4f80151 /OpenSim | |
parent | Make the inimaster option default to OpenSimDefaults.ini. (diff) | |
download | opensim-SC-2cf98e77fc331f6032f6eb600139771085629bbf.zip opensim-SC-2cf98e77fc331f6032f6eb600139771085629bbf.tar.gz opensim-SC-2cf98e77fc331f6032f6eb600139771085629bbf.tar.bz2 opensim-SC-2cf98e77fc331f6032f6eb600139771085629bbf.tar.xz |
Output an error and quit if the master file is missing. Also rename
OpenSim.ini.example to bin/OpenSimDefaults.ini.example
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Application/ConfigurationLoader.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 31ce500..9d6fef7 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -85,6 +85,9 @@ namespace OpenSim | |||
85 | string masterFileName = | 85 | string masterFileName = |
86 | startupConfig.GetString("inimaster", "OpenSimDefaults.ini"); | 86 | startupConfig.GetString("inimaster", "OpenSimDefaults.ini"); |
87 | 87 | ||
88 | if (masterFileName == "none") | ||
89 | masterFileName = String.Empty; | ||
90 | |||
88 | if (IsUri(masterFileName)) | 91 | if (IsUri(masterFileName)) |
89 | { | 92 | { |
90 | if (!sources.Contains(masterFileName)) | 93 | if (!sources.Contains(masterFileName)) |
@@ -95,10 +98,19 @@ namespace OpenSim | |||
95 | string masterFilePath = Path.GetFullPath( | 98 | string masterFilePath = Path.GetFullPath( |
96 | Path.Combine(Util.configDir(), masterFileName)); | 99 | Path.Combine(Util.configDir(), masterFileName)); |
97 | 100 | ||
98 | if (masterFileName != String.Empty && | 101 | if (masterFileName != String.Empty) |
99 | File.Exists(masterFilePath) && | 102 | { |
100 | (!sources.Contains(masterFilePath))) | 103 | if (File.Exists(masterFilePath) |
101 | sources.Add(masterFilePath); | 104 | { |
105 | if (!sources.Contains(masterFilePath)) | ||
106 | sources.Add(masterFilePath); | ||
107 | } | ||
108 | else | ||
109 | { | ||
110 | m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); | ||
111 | Environment.Exit(1); | ||
112 | } | ||
113 | } | ||
102 | } | 114 | } |
103 | 115 | ||
104 | 116 | ||