Projects
Kolab:3.4
pykolab
fix_mariadb_centos7.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_mariadb_centos7.patch of Package pykolab (Revision 131)
Currently displaying revision
131
,
Show latest
From 29431733f10e452a4291e626dd0f0c9c72b21753 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra <tp@tbits.net> Date: Thu, 12 Feb 2015 15:17:51 +0100 Subject: [PATCH] on CentOS7, there is MariaDB instead of MySQL. fixing bug 3877 --- pykolab/setup/setup_mysql.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py index 2211876..174cbc7 100644 --- a/pykolab/setup/setup_mysql.py +++ b/pykolab/setup/setup_mysql.py @@ -39,8 +39,13 @@ def description(): return _("Setup MySQL.") def execute(*args, **kw): + # on CentOS7, there is MariaDB instead of MySQL + mysqlservice = 'mysqld.service' + if os.path.isfile('/usr/lib/systemd/system/mariadb.service'): + mysqlservice = 'mariadb.service' + if os.path.isfile('/bin/systemctl'): - subprocess.call(['/bin/systemctl', 'restart', 'mysqld.service']) + subprocess.call(['/bin/systemctl', 'restart', mysqlservice]) elif os.path.isfile('/sbin/service'): subprocess.call(['/sbin/service', 'mysqld', 'restart']) elif os.path.isfile('/usr/sbin/service'): @@ -49,7 +54,7 @@ def execute(*args, **kw): log.error(_("Could not start the MySQL database service.")) if os.path.isfile('/bin/systemctl'): - subprocess.call(['/bin/systemctl', 'enable', 'mysqld.service']) + subprocess.call(['/bin/systemctl', 'enable', mysqlservice]) elif os.path.isfile('/sbin/chkconfig'): subprocess.call(['/sbin/chkconfig', 'mysqld', 'on']) elif os.path.isfile('/usr/sbin/update-rc.d'): -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.