From 7c5864ae37417b083de37b0f0b93ebc58c8580d6 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Wed, 24 Jun 2015 15:38:43 +0800 Subject: [PATCH] Fix heat-db-setup error on rhel7.1 In bash, '-gt' can not work with flaot number. Change-Id: I264e9e7ebe9de6aca116783a655a3efd9500c938 Closes-Bug: #1468217 --- bin/heat-db-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/heat-db-setup b/bin/heat-db-setup index c568cc216c..76d859e310 100755 --- a/bin/heat-db-setup +++ b/bin/heat-db-setup @@ -86,7 +86,7 @@ case "$1" in DB_SERVER="mysql-server" # Install mariadb-server in rhel7 and fedora if [[ -r /etc/redhat-release ]];then - ver=`grep -E -o '[0-9]+([.]?[0-9])*' /etc/redhat-release` + ver=`grep -E -o '[0-9]+' /etc/redhat-release| sed 1q` if [[ $ver -ge 7 ]];then SERVICE_MYSQLD="mariadb" DB_SERVER="mariadb-server"