From 12b1f745438a7fcccb397cf189b1a21938e25dbd Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 19 Sep 2016 15:43:53 +0000 Subject: [PATCH 1/1] minor change at install-openmano.sh script Signed-off-by: tierno --- scripts/install-openmano.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install-openmano.sh b/scripts/install-openmano.sh index 48e2a81d..9a2e725b 100755 --- a/scripts/install-openmano.sh +++ b/scripts/install-openmano.sh @@ -265,9 +265,7 @@ user=$DBUSER password=$DBPASSWD EOF -db_exists "mano_db" $TEMPFILE -DBEXISTS=$? -if [[ $DBEXISTS -eq 0 ]] ; then +if db_exists "mano_db" $TEMPFILE ; then if [[ -n $FORCEDB ]]; then echo " Deleting previous database mano_db" DBDELETEPARAM="" @@ -284,7 +282,7 @@ if [[ $DBEXISTS -eq 0 ]] ; then echo "Database exists. Use option '--forcedb' to force the deletion of the existing one" && exit 1 fi else - mysqladmin -u$DBUSER $DBPASSWD_PARAM -s create mano_db || ( echo "Error creating mano_db database" && exit 1 ) + mysqladmin -u$DBUSER $DBPASSWD_PARAM -s create mano_db || ! echo "Error creating mano_db database" || exit 1 echo "CREATE USER 'mano'@'localhost' identified by 'manopw';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 echo "GRANT ALL PRIVILEGES ON mano_db.* TO 'mano'@'localhost';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 echo " Database 'mano_db' created, user 'mano' password 'manopw'" -- 2.25.1