From: tierno Date: Thu, 27 Apr 2017 15:22:54 +0000 (+0200) Subject: Fix install_openmnano script order X-Git-Tag: v2.0.1~24 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;ds=inline;h=refs%2Fchanges%2F17%2F1717%2F2;hp=6df137c25d9e3d4ee3037df15c1c140660fbd9b3;p=osm%2FRO.git Fix install_openmnano script order Change-Id: I77782a37436f162b0f94707fb5629c0c7fcbfdbc Signed-off-by: tierno --- 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