Check MariaDB installation

Checking if MariaDB is installed before trying to install it.

Story: #2005902
Task: #33764

Change-Id: I20eeac76373058eca0c33da11eb1e9dfce91de54
(cherry picked from commit 7df4957949)
This commit is contained in:
Telles Nobrega 2019-07-26 15:44:04 -03:00 committed by Luigi Toscano
parent 7f4e060dd3
commit 1f92ebb034
1 changed files with 4 additions and 1 deletions

View File

@ -3,5 +3,8 @@
echo "Installing mysql compat" echo "Installing mysql compat"
MARIADB_VERSION=$(rpm -qa mariadb | cut -d- -f2) MARIADB_VERSION=$(rpm -qa mariadb | cut -d- -f2)
INSTALLED=$(rpm -qa | grep -i mariadb-compat-${MARIADB_VERSION}-)
rpm -ivh --nodeps http://yum.mariadb.org/$MARIADB_VERSION/rhel7-amd64/rpms/MariaDB-$MARIADB_VERSION-centos73-x86_64-compat.rpm if [[ -z "$INSTALLED" ]]; then
rpm -ivh --nodeps http://yum.mariadb.org/$MARIADB_VERSION/rhel7-amd64/rpms/MariaDB-$MARIADB_VERSION-centos73-x86_64-compat.rpm
fi