From 9fcf3f1a3f3457debf0f59ba7659492b44172b99 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Nov 2012 05:48:41 +0000 Subject: Make "config show/set/get/save" console commands available on all servers --- OpenSim/Region/Application/ConfigurationLoader.cs | 1 - OpenSim/Region/Application/OpenSim.cs | 134 +--------------------- OpenSim/Region/Application/OpenSimBase.cs | 65 ++++------- 3 files changed, 29 insertions(+), 171 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 8d95c41..fc3999f 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -188,7 +188,6 @@ namespace OpenSim // Make sure command line options take precedence m_config.Source.Merge(argvSource); - IConfig enVars = m_config.Source.Configs["Environment"]; if( enVars != null ) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index e5aecbc..e654cf7 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -82,8 +82,8 @@ namespace OpenSim { base.ReadExtraConfigSettings(); - IConfig startupConfig = m_config.Source.Configs["Startup"]; - IConfig networkConfig = m_config.Source.Configs["Network"]; + IConfig startupConfig = Config.Configs["Startup"]; + IConfig networkConfig = Config.Configs["Network"]; int stpMaxThreads = 15; @@ -148,7 +148,7 @@ namespace OpenSim break; case "rest": m_console = new RemoteConsole("Region"); - ((RemoteConsole)m_console).ReadConfig(m_config.Source); + ((RemoteConsole)m_console).ReadConfig(Config); break; default: m_console = new LocalConsole("Region"); @@ -158,7 +158,7 @@ namespace OpenSim MainConsole.Instance = m_console; - RegisterCommonAppenders(m_config.Source.Configs["Startup"]); + RegisterCommonAppenders(Config.Configs["Startup"]); RegisterConsoleCommands(); base.StartupSpecific(); @@ -357,26 +357,6 @@ namespace OpenSim "restart", "Restart all sims in this instance", RunCommand); - m_console.Commands.AddCommand("General", false, "config set", - "config set
", - "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); - - m_console.Commands.AddCommand("General", false, "config get", - "config get [
] []", - "Synonym for config show", - HandleConfig); - - m_console.Commands.AddCommand("General", false, "config show", - "config show [
] []", - "Show config information", - "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine - + "If a section is given but not a field, then all fields in that section are printed.", - HandleConfig); - - m_console.Commands.AddCommand("General", false, "config save", - "config save ", - "Save current configuration to a file at the given path", HandleConfig); - m_console.Commands.AddCommand("General", false, "command-script", "command-script