From d1b8630ef42a0c48e2cdef162bbd010d8838dc7c Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 20 Sep 2016 11:54:32 +0200 Subject: [PATCH] Bugs fixed in scripts related to database init and migrate Change-Id: Ie03ed8ba52a2d10296cef20860aceed35462702b Signed-off-by: garciadeblas --- database_utils/init_mano_db.sh | 11 ++++++----- database_utils/migrate_mano_db.sh | 2 +- scripts/install-openmano.sh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/database_utils/init_mano_db.sh b/database_utils/init_mano_db.sh index 4b73441d..9fc9b753 100755 --- a/database_utils/init_mano_db.sh +++ b/database_utils/init_mano_db.sh @@ -91,14 +91,14 @@ done shift $((OPTIND-1)) #check and ask for database user password -#DBUSER_="-u$DBUSER" -#DBPASS_="" -#[ -n "$DBPASS" ] && DBPASS_="-p$DBPASS" +DBUSER_="-u$DBUSER" +DBPASS_="" +[ -n "$DBPASS" ] && DBPASS_="-p$DBPASS" DBHOST_="-h$DBHOST" DBPORT_="-P$DBPORT" TEMPFILE="$(mktemp -q --tmpdir "initmanodb.XXXXXX")" -trap 'rm -f "$TEMPFILE"' EXIT +trap 'rm -f "$TEMPFILE"' EXIT SIGINT SIGTERM chmod 0600 "$TEMPFILE" cat >"$TEMPFILE" <"$TEMPFILE" <"$TEMPFILE" <