summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredy <aluque@soleta.eu>2018-06-14 10:13:52 +0200
committerFredy <aluque@soleta.eu>2018-06-14 10:13:52 +0200
commit6b84365868ca16c05abcbba06b69e60f25b8265d (patch)
treef05fb0918312851276c5e6c746f23163f6c9bf39
parentc4c8db14c350b04597ad8281cbed79cdd4f9e819 (diff)
#837 Check if OpenGnsys is already installed
-rw-r--r--admin/xajax_0.5_standard.zipbin241376 -> 0 bytes
-rwxr-xr-xinstaller/pkg-generator/DEBIAN/postinst9
-rwxr-xr-xinstaller/pkg-generator/genpkg.sh11
-rwxr-xr-xinstaller/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh2
4 files changed, 15 insertions, 7 deletions
diff --git a/admin/xajax_0.5_standard.zip b/admin/xajax_0.5_standard.zip
deleted file mode 100644
index d247c280..00000000
--- a/admin/xajax_0.5_standard.zip
+++ /dev/null
Binary files differ
diff --git a/installer/pkg-generator/DEBIAN/postinst b/installer/pkg-generator/DEBIAN/postinst
index 0c5723df..03b747b7 100755
--- a/installer/pkg-generator/DEBIAN/postinst
+++ b/installer/pkg-generator/DEBIAN/postinst
@@ -1265,6 +1265,15 @@ if [ "$RET" = "true" ]; then
exit 0
fi
+FILE=/opt/opengnsys/doc/VERSION.txt
+if [ -f $FILE ]; then
+ echo "File $FILE exists. This could mean that OpenGnsys has been previously"
+ echo "installed using the installer script. This apt package is not suitable"
+ echo "for upgrading and may break the system"
+ echo "Terminating!"
+ exit 1
+fi
+
echoAndLog "OpenGnsys installation begins at $(date)"
pushd $WORKDIR
diff --git a/installer/pkg-generator/genpkg.sh b/installer/pkg-generator/genpkg.sh
index bbea3365..1232409a 100755
--- a/installer/pkg-generator/genpkg.sh
+++ b/installer/pkg-generator/genpkg.sh
@@ -356,15 +356,14 @@ function cleanFiles()
local TO_CLEAN=( server/bin \
repoman/bin \
server/lib \
- admin/Sources/Services/ogAdmServerAux
- admin/Sources/Services/ogAdmRepoAux
+ admin/Sources/Services/ogAdmServerAux \
+ admin/Sources/Services/ogAdmRepoAux \
installer \
doc \
ogagentpkgs-1.1.0.tar.gz \
- admin/WebConsole \
- client/shared
- client/engine
- pkg-generator
+ client/shared \
+ client/engine \
+ pkg-generator \
.git )
pushd $ROOTDIR/tmp/opengnsys_installer
diff --git a/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh b/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh
index b086c95e..572c6158 100755
--- a/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh
+++ b/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh
@@ -491,7 +491,7 @@ function updateWebFiles()
rsync -irplt $WORKDIR/opengnsys/admin/WebConsole $INSTALL_TARGET
ERRCODE=$?
mv $INSTALL_TARGET/WebConsole $INSTALL_TARGET/www
- unzip -o $WORKDIR/opengnsys/admin/xajax_0.5_standard.zip -d $INSTALL_TARGET/www/xajax
+ # INCOMPATIBLE unzip -o $WORKDIR/opengnsys/admin/xajax_0.5_standard.zip -d $INSTALL_TARGET/www/xajax
unzip -o $WORKDIR/opengnsys/admin/slim-2.6.1.zip -d $INSTALL_TARGET/www/rest
unzip -o $WORKDIR/opengnsys/admin/swagger-ui-2.2.5.zip -d $INSTALL_TARGET/www/rest
if [ "$ERRCODE" != 0 ]; then