Merge "On SUSE-based systems, check whether we have mariadb or mysql service"

This commit is contained in:
Zuul 2019-02-14 11:23:28 +00:00 committed by Gerrit Code Review
commit a6c3f5886a
1 changed files with 7 additions and 1 deletions

View File

@ -16,7 +16,13 @@ MYSQL_DRIVER=${MYSQL_DRIVER:-PyMySQL}
register_database mysql
MYSQL_SERVICE_NAME=mysql
if is_suse || is_fedora && ! is_oraclelinux; then
if is_fedora && ! is_oraclelinux; then
MYSQL_SERVICE_NAME=mariadb
elif is_suse && systemctl list-unit-files | grep -q 'mariadb\.service'; then
# Older mariadb packages on SLES 12 provided mysql.service. The
# newer ones on SLES 12 and 15 use mariadb.service; they also
# provide a mysql.service symlink for backwards-compatibility, but
# let's not rely on that.
MYSQL_SERVICE_NAME=mariadb
fi