From 8e51ca3a7ba51ae1b38ba66ae24a958ccb405a21 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 13 Sep 2010 23:17:42 +0100 Subject: [PATCH] Output an error and quit if the master file is missing. Also rename OpenSim.ini.example to bin/OpenSimDefaults.ini.example --- .../Region/Application/ConfigurationLoader.cs | 20 +++++++++++++++---- ...ni.example => OpenSimDefaults.ini.example} | 0 2 files changed, 16 insertions(+), 4 deletions(-) rename bin/{OpenSim.ini.example => OpenSimDefaults.ini.example} (100%) diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 31ce50070b..9d6fef777d 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -85,6 +85,9 @@ namespace OpenSim string masterFileName = startupConfig.GetString("inimaster", "OpenSimDefaults.ini"); + if (masterFileName == "none") + masterFileName = String.Empty; + if (IsUri(masterFileName)) { if (!sources.Contains(masterFileName)) @@ -95,10 +98,19 @@ namespace OpenSim string masterFilePath = Path.GetFullPath( Path.Combine(Util.configDir(), masterFileName)); - if (masterFileName != String.Empty && - File.Exists(masterFilePath) && - (!sources.Contains(masterFilePath))) - sources.Add(masterFilePath); + if (masterFileName != String.Empty) + { + if (File.Exists(masterFilePath) + { + if (!sources.Contains(masterFilePath)) + sources.Add(masterFilePath); + } + else + { + m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); + Environment.Exit(1); + } + } } diff --git a/bin/OpenSim.ini.example b/bin/OpenSimDefaults.ini.example similarity index 100% rename from bin/OpenSim.ini.example rename to bin/OpenSimDefaults.ini.example