sentora / sentora-installers

Provides a central place to store, version and distribute the Sentora installer and upgrade scripts from.
GNU General Public License v3.0
153 stars 148 forks source link

Installer (beta5) Does not check for previously installed software correctly #20

Closed bambusoft closed 10 years ago

bambusoft commented 10 years ago

Using sentora-installer.sh ( https://github.com/5050/sentora-installers/blob/master/sentora_install.sh ) with this values:

OS: Ubuntu 14.04

The script uses this two variables to identify previoulsy installed packages: DB_SERVER="mysql" HTTP_SERVER="apache" and later on check for previously installed software with inst() function for ubuntu with:

if (inst $DB_SERVER) || (inst dovecot) || (inst $HTTP_SERVER) || (inst php) || (inst bind); then...

The if statment must abort the installation if this and other packages are actually installed in the system, but the correct values to perform this check are: DB_SERVER="mysql-server" HTTP_SERVER="apache2"

You can reproduce this behaviour just running the script again after the first succesfully installation or running the following commands:

dpkg -l apache dpkg-query: no pakages found matching apache

dpkg -l apache2 ... ii apache2 2.4.7-1ubunt Apache HTTP server

(similar result with mysql-server)

5050 commented 10 years ago

thank you, I corrected it and also the mix with service name at end of install And I use now a better variable name to avoid such mix between package name, function name and service name.

bambusoft commented 10 years ago

You're welcome, and sorry for bothering you with this issue again, but the next packages are not being checked correctly using the inst() function at dpkg -l "$1"

Package name: bind => bind9 or dnsutils dovecot => dovecot-core postfix => postfix (this one is ok) php => libapache2-mod-php5

Using sentora-installer.sh with: SENTORA_INSTALLER_VERSION="V1.0.0-beta2" SENTORA_GITHUB_VERSION="1.0.0-beta6" SENTORA_PRECONF_VERSION="master"