[Opensim-dev] Ini file(s) loading

Justin Clark-Casey jjustincc at googlemail.com
Fri Mar 6 15:04:37 UTC 2009


Melanie wrote:
> Hi,
> 
> 
> Jeff Ames wrote:
>> Melanie wrote:
>>> read [the config directory] first
>>> then read the inimaster
>>> then read the inifile
> 
> This is because the config/* files would hold the defaults, they 
> must be read first.
> 
> [...]
> 
>> Then we could break up and move OpenSim.ini.example entirely to
>> config/*.ini.example files, and when the user wants to change a value,
>> create foo.ini based on foo.ini.example (copying the whole file if
>> they want everything, or only adding the options they want to
>> explicitly set).
>>
> 
> I was suggesting to get away from *.example files. Instead, I am 
> proposing to break up OpenSim.ini into *.ini files that provide the 
> defaults. The in-code defaults are a requirement of Nini, but they 
> are not functional, just ignore that they're there. The requirement 
> for an OpenSim.ini file in code needs to be dropped, of course.

If/when we split up OpenSim,ini then we do largely need to get away from .example files - renaming lots of 
config/*.ini.example files is obviously a no go.

If we get rid of OpenSim.ini entirely, then when a new user wants to change their storage/network settings (which I 
suspect pretty much everyone does sooner or later), they will either

(a)  Follow some instructions to copy config/storage.ini to OpenSim.ini and then tweak it or
(b)  Change config/storage.ini directly

Even if we encouraged (a), I think that realistically people will just end up doing (b).  If config/storage.ini ends up 
in SVN, then when it changes we will wreck their configuration.  I think that overriding default storage settings would 
also be confusing to users.

So I would argue that we should retain mandatory OpenSim.ini/OpenSim.ini.example just for storage and other absolutely 
basic settings (e.g. gridmode).  This would also mean that many users wouldn't need to worry at all about the contents 
of config/

I acknowledge this may be a pita for those supplying configuration purely over the network, though maybe there could be 
some extra setting that switches off a mandatory OpenSim.ini in these situations.

> 
> That is why the config directory needs to be read first - it 
> provides the defaults! Inimaster would be rendered useless by the 
> load order you're proposing!
> 
>> Then I guees the load order would be:
>>  - read inimaster (if present)
>>  - read config/*.ini (if present)
>>  - use defaults in code for anything not set
>>
> 
> See above, this won't serve the users' needs. In your scenario, if 
> the config/*.example changes, they'd still need to merge.
> 
> What I propose, to reiterate, is this:
> 
> Break up Opensim.ini.example into config/*.ini. Uncomment all the 
> options so they serve as defaults.
> Remove the explicit requirement for an ini file.
> This way, sitewide changes from the provided defaults go to 
> inimaster, and machine/instance settings go to opensim.ini.
> The files in config/ can remain unchanged and can be updated on 
> every svn update, without manual merging.
> 
> Of course, many other use cases are possible, including 
> modifications to config/*.ini if desired, or omitting either 
> configuration source.
> 
> Melanie
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
> 


-- 
justincc
Justin Clark-Casey
http://justincc.wordpress.com



More information about the Opensim-dev mailing list