Ignore:
Timestamp:
05/17/12 12:59:31 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2557 - Correacao na identificacao do SO. Agora o instalador seleciona o SO automaticamente

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/INSTALL/expressoInstall.sh

    r6207 r6219  
    4747[ $UID != 0 ] && { echo "Este script deve ser executado como superusuario (root) ou com sudo"; exit 1; } 
    4848 
    49 # Instala o dialog 
    50 # Se o arquivo existir, eh Debian ou variante ( ls /etc/*[-_]{release,version} ) 
    51 if [ -f /etc/lsb-release ]  
    52 then 
    53         apt-get -y install dialog || { echo "Falha ao instalar o dialog! Por favor, instale manualmente."; exit 1; } 
    54 else 
    55         yum -y install dialog || { echo "Falha ao instalar o dialog! Por favor, instale manualmente."; exit 1; } 
    56 fi 
    5749 
    5850# Telas da instalacao 
     
    7264dialog --backtitle "$BACKTITLE" --cr-wrap --yesno "$INTRO" 18 80 || exit 0 
    7365 
    74 # Menu de selecao do SO 
    75 SO=$( dialog --backtitle "$BACKTITLE" --stdout --menu 'Em qual sistema operacional (SO) o ExpressoLivre será instalado?' 13 70 10 \ 
    76         rhel6 'GNU/Linux Red Hat (v6.x) ou CentOS (v6.x)' \ 
    77         debian-squeeze 'GNU/Linux Debian Squeeze (v6.x)'  \ 
    78         ubuntu-11.10 'GNU/Linux Ubuntu Server (11.10)' ) 
    79          
    80         # TODO: Precio de ajuda para implementar e testar nestas distros 
    81         #sles10 'GNU/Linux SuSe Enterprise Linux (v10.x)' \ 
    82         #sles11 'GNU/Linux SuSe Enterprise Linux (v11.x)' \  
     66# Identifica o SO 
     67qualSO 
     68# Verifica se o SO eh compativel com o instalador 
     69if ( validaSO "Debian" "6.0" ) 
     70then 
     71        INSTALL="debian-squeeze" 
     72elif ( validaSO "Ubuntu" "11.10" ) 
     73then 
     74        INSTALL="ubuntu-11.10" 
     75elif ( validaSO "CentOS" "6." || validaSO "RedHat" "6." ) 
     76then 
     77        INSTALL="rhel6" 
     78else 
     79        echo "Sistema operacional desconhecido ou incompativel com o instalador do Expresso Livre!" 
     80        echo "$OSSTR" 
     81        echo "Por favor, utilize uma distribuição GNU/Linux compatível: Debian 6.x, Ubuntu 11.10 ou CentOS/RedHat 6.x" 
     82        exit 1 
     83fi 
    8384 
    84 BACKTITLE="$BACKTITLE, para $SO" 
     85BACKTITLE="$BACKTITLE, para $INSTALL" 
    8586 
    8687# Inicializacao basica de instalacao, como atualização de repositório e criação de variáveis de ambiente 
    87 ini_$SO 
     88ini_$INSTALL 
    8889 
    8990# Inicia a escolha/instalacao e configuracao dos servicos nessarios ao ExpressoLivre 
     
    99100for I in $SERVICOS 
    100101do 
    101         $I\_$SO 
     102        $I\_$INSTALL 
    102103done 
    103104 
Note: See TracChangeset for help on using the changeset viewer.