From 4b9aa37abb7dff68aecc652f916ac9895e9e21e9 Mon Sep 17 00:00:00 2001 From: Telles Nobrega Date: Fri, 26 Jul 2019 15:44:04 -0300 Subject: [PATCH] Check MariaDB installation Checking if MariaDB is installed before trying to install it. Story: #2005902 Task: #33764 Change-Id: I20eeac76373058eca0c33da11eb1e9dfce91de54 (cherry picked from commit 7df4957949fed406b708b850677a4a41d7926690) --- sahara/plugins/mapr/resources/images/centos/configure_hue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sahara/plugins/mapr/resources/images/centos/configure_hue b/sahara/plugins/mapr/resources/images/centos/configure_hue index b53d383372..ec21caaa10 100644 --- a/sahara/plugins/mapr/resources/images/centos/configure_hue +++ b/sahara/plugins/mapr/resources/images/centos/configure_hue @@ -3,5 +3,8 @@ echo "Installing mysql compat" 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 \ No newline at end of file