summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-02-07 11:18:11 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-02-07 11:56:17 +0100
commit5a05e02bb54bf36e76c004ed732e0f5728869045 (patch)
tree9e2f72d5ad76ddd23cd686228e1b97ed851d6738
parent2bf61de20e00fe9e00b16e3e14a580e80468fb83 (diff)
downloadpykolab-5a05e02bb54bf36e76c004ed732e0f5728869045.tar.gz
Attempt to load the #chwala database schema files as well (Ref. T967)
-rw-r--r--pykolab/setup/setup_roundcube.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 6d48778..5bbeda0 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -193,6 +193,23 @@ def execute(*args, **kw):
if not schema_filepath in schema_files:
schema_files.append(schema_filepath)
+ schema_files = []
+ for root, directories, filenames in os.walk('/usr/share/doc/'):
+ directories.sort()
+ for directory in directories:
+ if directory.startswith("chwala"):
+ for nested_root, nested_directories, nested_filenames in os.walk(os.path.join(root, directory)):
+ for filename in nested_filenames:
+ if filename.startswith('mysql.initial') and filename.endswith('.sql'):
+ schema_filepath = os.path.join(nested_root,filename)
+ if not schema_filepath in schema_files:
+ schema_files.append(schema_filepath)
+
+ if len(schema_files) > 0:
+ break
+ if len(schema_files) > 0:
+ break
+
if not os.path.isfile('/tmp/kolab-setup-my.cnf'):
utils.multiline_message(
"""Please supply the MySQL root password"""