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:18:11 +0100
commit6f8c9e5f15cb1fdb986fc9a8ce4f3fd8e13e9d4d (patch)
treecb26a76f367cb753c853a699df0fe75dd749d67b
parentb911e8302867f1eea16749bdf5626ee7c0a5969d (diff)
downloadpykolab-6f8c9e5f15cb1fdb986fc9a8ce4f3fd8e13e9d4d.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"""