summaryrefslogtreecommitdiffstats
path: root/installer/pkg-generator/DEBIAN/preinst
blob: fed7ea14a561cba5225f8a6dc93ae7a107e1b8a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# This script is executed before the package it belongs to is unpacked 
# from its Debian archive (".deb") file. Many 'preinst' scripts stop 
# services for packages which are being upgraded until their installation
# or upgrade is completed (following the successful execution of the
# 'postinst' script).

# test if it is already installed using old installer script

VFILE=/opt/opengnsys/doc/VERSION.txt     
if [ -f $VFILE ]; then
   echo "##############################################################"
   echo "ERROR: File $VFILE exists. This could" 
   echo "mean that OpenGnsys has been previously installed using the"
   echo "installer script." 
   echo "This apt package is not suitable for upgrading and may break"
   echo "the system. If you are shure what you are doing you could"
   echo "delete or rename that file and try again"
   echo "Terminating!"
   echo "##############################################################"
   exit 1
fi