diff options
author | Melanie | 2010-09-13 23:17:42 +0100 |
---|---|---|
committer | Melanie | 2010-09-13 23:17:42 +0100 |
commit | 8e51ca3a7ba51ae1b38ba66ae24a958ccb405a21 (patch) | |
tree | ae6840bde7e14d2f1f4cd96f1aa53b8b4ff40353 /OpenSim | |
parent | Make the inimaster option default to OpenSimDefaults.ini. (diff) | |
download | opensim-SC_OLD-8e51ca3a7ba51ae1b38ba66ae24a958ccb405a21.zip opensim-SC_OLD-8e51ca3a7ba51ae1b38ba66ae24a958ccb405a21.tar.gz opensim-SC_OLD-8e51ca3a7ba51ae1b38ba66ae24a958ccb405a21.tar.bz2 opensim-SC_OLD-8e51ca3a7ba51ae1b38ba66ae24a958ccb405a21.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 | ||