36
36
from setup.util import query_user
40
# This dict maps new config option paths ('section/option_name') to legacy
41
# config option names ('option_name').
42
# NOTE: This is the inverse of the dictionary from ivle/conf/conf.py.
44
'urls/root': 'root_dir',
45
'paths/prefix': 'prefix',
46
'paths/data': 'data_path',
47
'paths/logs': 'log_path',
48
'paths/site_packages': 'python_site_packages_override',
49
'urls/public_host': 'public_host',
50
'os/allowed_uids': 'allowed_uids',
51
'database/host': 'db_host',
52
'database/port': 'db_port',
53
'database/name': 'db_dbname',
54
'plugins/forum/dbname': 'db_forumdbname',
55
'database/username': 'db_user',
56
'database/password': 'db_password',
57
'auth/modules': 'auth_modules',
58
'auth/ldap_url': 'ldap_url',
59
'auth/ldap_format_string': 'ldap_format_string',
60
'auth/subject_pulldown_modules': 'subject_pulldown_modules',
61
'urls/svn_addr': 'svn_addr',
62
'usrmgt/host': 'usrmgt_host',
63
'usrmgt/port': 'usrmgt_port',
64
'usrmgt/magic': 'usrmgt_magic',
65
'plugins/forum/secret': 'forum_secret',
68
41
# conf_options maps option names to values
261
234
# The reason for this is that these settings are used by other phases
262
235
# of setup besides conf, so we need to know them.
263
236
# Also this allows you to hit Return to accept the existing value.
265
confmodule = __import__("ivle/conf/conf")
266
for opt in config_options:
268
conf_options[opt.option_name] = \
269
confmodule.__dict__[CONFIG_OPTIONS[opt.option_name]]
271
conf_options[opt.option_name] = opt.default
273
# Just set reasonable defaults
274
for opt in config_options:
237
conf = ivle.config.Config()
238
for opt in config_options:
240
conf_options[opt.option_name] = conf.get_by_path(opt.option_name)
275
242
conf_options[opt.option_name] = opt.default
277
244
# Set up some variables