From 3c4b2bfa612353fab5e6531468483e6bed6ee98b Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 24 Apr 2017 18:37:49 +0200 Subject: [PATCH] fix issue at install-db-server.sh Change-Id: I80474cce8ea2572a3532e8c4479b20f45f2a185c Signed-off-by: tierno --- database_utils/install-db-server.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/database_utils/install-db-server.sh b/database_utils/install-db-server.sh index 24116b5..0599b57 100755 --- a/database_utils/install-db-server.sh +++ b/database_utils/install-db-server.sh @@ -141,9 +141,9 @@ echo ' } function db_exists(){ # (db_name, credential_file) - RESULT=`mysqlshow --defaults-extra-file="$2" | grep -v Wildcard | grep -o $1` \ - || ! echo "$RESULT" >&2 \ - || exit 1 + # check credentials + mysqlshow --defaults-extra-file="$2" >/dev/null || exit 1 + RESULT=`mysqlshow --defaults-extra-file="$2" | grep -v Wildcard | grep -o $1` if [ "$RESULT" == "$1" ]; then # echo " DB $1 exists" return 0 -- 2.25.1