From f9975f1f7b09b88db1d246312d95c1139828c5e0 Mon Sep 17 00:00:00 2001 From: tierno Date: Thu, 27 Apr 2017 17:22:54 +0200 Subject: [PATCH] Fix install_openmnano script order Change-Id: I77782a37436f162b0f94707fb5629c0c7fcbfdbc Signed-off-by: tierno --- database_utils/install-db-server.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/database_utils/install-db-server.sh b/database_utils/install-db-server.sh index 5f1c5633..d473478d 100755 --- a/database_utils/install-db-server.sh +++ b/database_utils/install-db-server.sh @@ -218,6 +218,12 @@ fi # 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 @@ then 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 -- 2.25.1