Fix install_openmnano script order
Change-Id: I77782a37436f162b0f94707fb5629c0c7fcbfdbc
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/database_utils/install-db-server.sh b/database_utils/install-db-server.sh
index 5f1c563..d473478 100755
--- a/database_utils/install-db-server.sh
+++ b/database_utils/install-db-server.sh
@@ -218,6 +218,12 @@
# if not assuming ubuntu type
[ -f /etc/redhat-release ] || _DISTRO=$(lsb_release -is 2>/dev/null)
+if [[ -z "$NO_PACKAGES" ]]
+then
+ [ "$USER" != "root" ] && echo "Needed root privileges" >&2 && exit 1
+ _install_mysql_package || exit 1
+fi
+
# Creating temporary file for MYSQL installation and initialization"
TEMPFILE="$(mktemp -q --tmpdir "installdb.XXXXXX")"
trap 'rm -f "$TEMPFILE"' EXIT
@@ -249,12 +255,6 @@
exit
fi
-if [[ -z "$NO_PACKAGES" ]]
-then
- [ "$USER" != "root" ] && echo "Needed root privileges" >&2 && exit 1
- _install_mysql_package || exit 1
-fi
-
# Create or update database
if db_exists $DB_NAME $TEMPFILE ; then
if [[ -n $FORCEDB ]] ; then