source: installer/opengnsys_installer.sh @ 044cd96

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 044cd96 was c5ce04c, checked in by ramon <ramongomez@…>, 16 years ago

git-svn-id: https://opengnsys.es/svn/trunk@576 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 33.0 KB
RevLine 
[a01156a]1#!/bin/bash
2
3#####################################################################
4####### Script instalador OpenGnsys
5####### autor: Luis Guillén <lguillen@unizar.es>
6#####################################################################
7
8
9WORKDIR=/tmp/opengnsys_installer
[13a01a7]10LOG_FILE=/tmp/opengnsys_installation.log
[a01156a]11
12# Array con las dependencias
[0795938]13DEPENDENCIES=( subversion apache2 php5 mysql-server php5-mysql nfs-kernel-server dhcp3-server udpcast bittorrent tftp-hpa tftpd-hpa syslinux openbsd-inetd update-inetd build-essential libmysqlclient15-dev wget doxygen graphviz)
[a01156a]14
15INSTALL_TARGET=/opt/opengnsys
16
[892606b9]17MYSQL_ROOT_PASSWORD="passwordroot"
18
[a01156a]19# conexión al svn
[1b92629]20SVN_URL=svn://www.informatica.us.es:3690/opengnsys/trunk
[a01156a]21
22# Datos de base de datos
[892606b9]23OPENGNSYS_DATABASE=ogBDAdmin
24OPENGNSYS_DB_USER=usuog
25OPENGNSYS_DB_PASSWD=passusuog
[c5ce04c]26OPENGNSYS_DB_DEFAULTUSER=usadm
27OPENGNSYS_DB_DEFAULTPASSWD=passusuadm
[892606b9]28OPENGNSYS_DB_CREATION_FILE=opengnsys/admin/Database/ogBDAdmin.sql
29
30USUARIO=`whoami`
[a01156a]31
[892606b9]32if [ $USUARIO != 'root' ]
[a01156a]33then
34        echo "ERROR: this program must run under root privileges!!"
35        exit 1
36fi
37
38
39mkdir -p $WORKDIR
[892606b9]40pushd $WORKDIR
[a01156a]41
42#####################################################################
43####### Algunas funciones útiles de propósito general:
44#####################################################################
[13a01a7]45function getDateTime()
[a01156a]46{
47        echo `date +%Y%m%d-%H%M%S`
48}
49
50# Escribe a fichero y muestra por pantalla
[13a01a7]51function echoAndLog()
[a01156a]52{
53        echo $1
54        FECHAHORA=`getDateTime`
55        echo "$FECHAHORA;$SSH_CLIENT;$1" >> $LOG_FILE
56}
57
[13a01a7]58function errorAndLog()
[a01156a]59{
60        echo "ERROR: $1"
61        FECHAHORA=`getDateTime`
62        echo "$FECHAHORA;$SSH_CLIENT;ERROR: $1" >> $LOG_FILE
63}
64
65# comprueba si el elemento pasado en $2 esta en el array $1
[13a01a7]66function isInArray()
[a01156a]67{
68        if [ $# -ne 2 ]; then
[13a01a7]69                errorAndLog "${FUNCNAME}(): invalid number of parameters"
[a01156a]70                exit 1
71        fi
72
[13a01a7]73        echoAndLog "${FUNCNAME}(): checking if $2 is in $1"
[a01156a]74        local deps
[5c33840]75        eval "deps=( \"\${$1[@]}\" )"
[a01156a]76        elemento=$2
77
78        local is_in_array=1
79        # copia local del array del parametro 1
80        for (( i = 0 ; i < ${#deps[@]} ; i++ ))
81        do
82                if [ "${deps[$i]}" = "${elemento}" ]; then
83                        echoAndLog "isInArray(): $elemento found in array"
84                        is_in_array=0
85                fi
86        done
87
88        if [ $is_in_array -ne 0 ]; then
[13a01a7]89                echoAndLog "${FUNCNAME}(): $elemento NOT found in array"
[a01156a]90        fi
91
92        return $is_in_array
93
94}
95
96#####################################################################
97####### Funciones de manejo de paquetes Debian
98#####################################################################
99
[13a01a7]100function checkPackage()
[a01156a]101{
102        package=$1
103        if [ -z $package ]; then
104                errorAndLog "checkPackage(): parameter required"
105                exit 1
106        fi
107        echoAndLog "checkPackage(): checking if package $package exists"
108        dpkg -L $package &>/dev/null
109        if [ $? -eq 0 ]; then
110                echoAndLog "checkPackage(): package $package exists"
111                return 0
112        else
113                echoAndLog "checkPackage(): package $package doesn't exists"
114                return 1
115        fi
116}
117
118# recibe array con dependencias
119# por referencia deja un array con las dependencias no resueltas
120# devuelve 1 si hay alguna dependencia no resuelta
[13a01a7]121function checkDependencies()
[a01156a]122{
123        if [ $# -ne 2 ]; then
124                errorAndLog "checkDependencies(): invalid number of parameters"
125                exit 1
126        fi
127
128        echoAndLog "checkDependencies(): checking dependences"
129        uncompletedeps=0
130
131        # copia local del array del parametro 1
132        local deps
[5c33840]133        eval "deps=( \"\${$1[@]}\" )"
[a01156a]134
135        declare -a local_notinstalled
[5c33840]136
[a01156a]137        for (( i = 0 ; i < ${#deps[@]} ; i++ ))
138        do
139                checkPackage ${deps[$i]}
140                if [ $? -ne 0 ]; then
141                        local_notinstalled[$uncompletedeps]=$package
142                        let uncompletedeps=uncompletedeps+1
143                fi
144        done
145
146        # relleno el array especificado en $2 por referencia
147        for (( i = 0 ; i < ${#local_notinstalled[@]} ; i++ ))
148        do
149                eval "${2}[$i]=${local_notinstalled[$i]}"
150        done
151
152        # retorna el numero de paquetes no resueltos
153        echoAndLog "checkDependencies(): dependencies uncompleted: $uncompletedeps"
154        return $uncompletedeps
155}
156
157# Recibe un array con las dependencias y lo instala
[13a01a7]158function installDependencies()
[a01156a]159{
160        if [ $# -ne 1 ]; then
161                errorAndLog "installDependencies(): invalid number of parameters"
162                exit 1
163        fi
164        echoAndLog "installDependencies(): installing uncompleted dependencies"
165
166        # copia local del array del parametro 1
167        local deps
[5c33840]168        eval "deps=( \"\${$1[@]}\" )"
[a01156a]169
170        local string_deps=""
171        for (( i = 0 ; i < ${#deps[@]} ; i++ ))
172        do
173                string_deps="$string_deps ${deps[$i]}"
174        done
175
176        if [ -z "${string_deps}" ]; then
177                errorAndLog "installDependencies(): array of dependeces is empty"
178                exit 1
179        fi
180
181        OLD_DEBIAN_FRONTEND=$DEBIAN_FRONTEND
182        export DEBIAN_FRONTEND=noninteractive
183
184        echoAndLog "installDependencies(): now ${string_deps} will be installed"
185        apt-get -y install --force-yes ${string_deps}
186        if [ $? -ne 0 ]; then
187                errorAndLog "installDependencies(): error installing dependencies"
188                return 1
189        fi
190
191        DEBIAN_FRONTEND=$OLD_DEBIAN_FRONTEND
192        echoAndLog "installDependencies(): dependencies installed"
193}
194
[13a01a7]195# Hace un backup del fichero pasado por parámetro
196# deja un -last y uno para el día
197function backupFile()
198{
199        if [ $# -ne 1 ]; then
200                errorAndLog "${FUNCNAME}(): invalid number of parameters"
201                exit 1
202        fi
203
204        local fichero=$1
205        local fecha=`date +%Y%m%d`
206
207        if [ ! -f $fichero ]; then
208                errorAndLog "${FUNCNAME}(): file $fichero doesn't exists"
209                return 1
210        fi
211
212        echoAndLog "${FUNCNAME}(): realizando backup de $fichero"
213
214        # realiza una copia de la última configuración como last
215        cp -p $fichero "${fichero}-LAST"
216
217        # si para el día no hay backup lo hace, sino no
218        if [ ! -f "${fichero}-${fecha}" ]; then
219                cp -p $fichero "${fichero}-${fecha}"
220        fi
221
222        echoAndLog "${FUNCNAME}(): backup realizado"
223}
224
[a01156a]225#####################################################################
226####### Funciones para el manejo de bases de datos
227#####################################################################
228
229# This function set password to root
[13a01a7]230function mysqlSetRootPassword()
[a01156a]231{
232        if [ $# -ne 1 ]; then
233                errorAndLog "mysqlSetRootPassword(): invalid number of parameters"
234                exit 1
235        fi
236
237        local root_mysql=$1
238        echoAndLog "mysqlSetRootPassword(): setting root password in MySQL server"
239        /usr/bin/mysqladmin -u root password ${root_mysql}
240        if [ $? -ne 0 ]; then
241                errorAndLog "mysqlSetRootPassword(): error while setting root password in MySQL server"
242                return 1
243        fi
244        echoAndLog "mysqlSetRootPassword(): root password saved!"
245        return 0
246}
247
[892606b9]248# Si el servicio mysql esta ya instalado cambia la variable de la clave del root por la ya existente
[13a01a7]249function mysqlGetRootPassword(){
[892606b9]250        local pass_mysql
251        local pass_mysql2
252        stty -echo
253        echo "Existe un servicio mysql ya instalado"
254        read -p  "Insertar clave de root de Mysql: " pass_mysql
255        echo ""
256        read -p "Confirmar clave:" pass_mysql2
257        echo ""
258        stty echo
259        if [ "$pass_mysql" == "$pass_mysql2" ] ;then
[8125e7c]260                MYSQL_ROOT_PASSWORD=$pass_mysql
[892606b9]261                echo "La clave es: ${MYSQL_ROOT_PASSWORD}"
262                return 0
263        else
264                echo "Las claves no coinciden no se configura la clave del servidor de base de datos."
265                echo "las operaciones con la base de datos daran error"
266                return 1
267        fi
268
269
270}
271
[a01156a]272# comprueba si puede conectar con mysql con el usuario root
273function mysqlTestConnection()
274{
275        if [ $# -ne 1 ]; then
276                errorAndLog "mysqlTestConnection(): invalid number of parameters"
277                exit 1
278        fi
279
280        local root_password="${1}"
281        echoAndLog "mysqlTestConnection(): checking connection to mysql..."
282        echo "" | mysql -uroot -p"${root_password}"
283        if [ $? -ne 0 ]; then
284                errorAndLog "mysqlTestConnection(): connection to mysql failed, check root password and if daemon is running!"
285                return 1
286        else
287                echoAndLog "mysqlTestConnection(): connection success"
288                return 0
289        fi
290}
291
292# comprueba si la base de datos existe
293function mysqlDbExists()
294{
295        if [ $# -ne 2 ]; then
296                errorAndLog "mysqlDbExists(): invalid number of parameters"
297                exit 1
298        fi
299
300        local root_password="${1}"
301        local database=$2
302        echoAndLog "mysqlDbExists(): checking if $database exists..."
303        echo "show databases" | mysql -uroot -p"${root_password}" | grep "^${database}$"
304        if [ $? -ne 0 ]; then
305                echoAndLog "mysqlDbExists():database $database doesn't exists"
306                return 1
307        else
308                echoAndLog "mysqlDbExists():database $database exists"
309                return 0
310        fi
311}
312
313function mysqlCheckDbIsEmpty()
314{
315        if [ $# -ne 2 ]; then
316                errorAndLog "mysqlCheckDbIsEmpty(): invalid number of parameters"
317                exit 1
318        fi
319
320        local root_password="${1}"
321        local database=$2
322        echoAndLog "mysqlCheckDbIsEmpty(): checking if $database is empty..."
323        num_tablas=`echo "show tables" | mysql -uroot -p"${root_password}" "${database}" | wc -l`
324        if [ $? -ne 0 ]; then
325                errorAndLog "mysqlCheckDbIsEmpty(): error executing query, check database and root password"
326                exit 1
327        fi
328
329        if [ $num_tablas -eq 0 ]; then
330                echoAndLog "mysqlCheckDbIsEmpty():database $database is empty"
331                return 0
332        else
333                echoAndLog "mysqlCheckDbIsEmpty():database $database has tables"
334                return 1
335        fi
336
337}
338
339
340function mysqlImportSqlFileToDb()
341{
342        if [ $# -ne 3 ]; then
[c5ce04c]343                errorAndLog "${FNCNAME}(): invalid number of parameters"
[a01156a]344                exit 1
345        fi
346
347        local root_password="${1}"
348        local database=$2
349        local sqlfile=$3
350
351        if [ ! -f $sqlfile ]; then
[c5ce04c]352                errorAndLog "${FUNCNAME}(): Unable to locate $sqlfile!!"
[a01156a]353                return 1
354        fi
355
[c5ce04c]356        echoAndLog "${FUNCNAME}(): importing sql file to ${database}..."
357        perl -p -i -e "s/SERVERIP/$SERVERIP/g" $sqlfile
[a01156a]358        mysql -uroot -p"${root_password}" "${database}" < $sqlfile
359        if [ $? -ne 0 ]; then
[c5ce04c]360                errorAndLog "${FUNCNAME}(): error while importing $sqlfile in database $database"
[a01156a]361                return 1
362        fi
[c5ce04c]363        echoAndLog "${FUNCNAME}(): file imported to database $database"
[a01156a]364        return 0
365}
366
367# Crea la base de datos
368function mysqlCreateDb()
369{
370        if [ $# -ne 2 ]; then
[a555f49]371                errorAndLog "${FUNCNAME}(): invalid number of parameters"
[a01156a]372                exit 1
373        fi
374
375        local root_password="${1}"
376        local database=$2
377
[a555f49]378        echoAndLog "${FUNCNAME}(): creating database..."
[a01156a]379        mysqladmin -u root --password="${root_password}" create $database
380        if [ $? -ne 0 ]; then
[a555f49]381                errorAndLog "${FUNCNAME}(): error while creating database $database"
[a01156a]382                return 1
383        fi
[a555f49]384        echoAndLog "${FUNCNAME}(): database $database created"
[a01156a]385        return 0
386}
387
388
389function mysqlCheckUserExists()
390{
391        if [ $# -ne 2 ]; then
392                errorAndLog "mysqlCheckUserExists(): invalid number of parameters"
393                exit 1
394        fi
395
396        local root_password="${1}"
397        local userdb=$2
398
399        echoAndLog "mysqlCheckUserExists(): checking if $userdb exists..."
400        echo "select user from user where user='${userdb}'\\G" |mysql -uroot -p"${root_password}" mysql | grep user
401        if [ $? -ne 0 ]; then
402                echoAndLog "mysqlCheckUserExists(): user doesn't exists"
403                return 1
404        else
405                echoAndLog "mysqlCheckUserExists(): user already exists"
406                return 0
407        fi
408
409}
410
411# Crea un usuario administrativo para la base de datos
412function mysqlCreateAdminUserToDb()
413{
414        if [ $# -ne 4 ]; then
415                errorAndLog "mysqlCreateAdminUserToDb(): invalid number of parameters"
416                exit 1
417        fi
418
419        local root_password=$1
420        local database=$2
421        local userdb=$3
422        local passdb=$4
423
424        echoAndLog "mysqlCreateAdminUserToDb(): creating admin user ${userdb} to database ${database}"
425
426        cat > $WORKDIR/create_${database}.sql <<EOF
427GRANT USAGE ON *.* TO '${userdb}'@'localhost' IDENTIFIED BY '${passdb}' ;
428GRANT ALL PRIVILEGES ON ${database}.* TO '${userdb}'@'localhost' WITH GRANT OPTION ;
429FLUSH PRIVILEGES ;
430EOF
431        mysql -u root --password=${root_password} < $WORKDIR/create_${database}.sql
432        if [ $? -ne 0 ]; then
433                errorAndLog "mysqlCreateAdminUserToDb(): error while creating user in mysql"
434                rm -f $WORKDIR/create_${database}.sql
435                return 1
436        else
437                echoAndLog "mysqlCreateAdminUserToDb(): user created ok"
438                rm -f $WORKDIR/create_${database}.sql
439                return 0
440        fi
441}
442
443
444#####################################################################
445####### Funciones para el manejo de Subversion
446#####################################################################
447
[7586ca3]448function svnCheckoutCode()
[a01156a]449{
[9fb5086]450        if [ $# -ne 1 ]; then
[13a01a7]451                errorAndLog "${FUNCNAME}(): invalid number of parameters"
[a01156a]452                exit 1
453        fi
454
455        local url=$1
456
[13a01a7]457        echoAndLog "${FUNCNAME}(): downloading subversion code..."
[a01156a]458
[892606b9]459        /usr/bin/svn co "${url}" opengnsys
[a01156a]460        if [ $? -ne 0 ]; then
[13a01a7]461                errorAndLog "${FUNCNAME}(): error getting code from ${url}, verify your user and password"
[a01156a]462                return 1
463        fi
[13a01a7]464        echoAndLog "${FUNCNAME}(): subversion code downloaded"
[a01156a]465        return 0
466}
467
[13a01a7]468
469function svnExportCode()
470{
471        if [ $# -ne 1 ]; then
472                errorAndLog "${FUNCNAME}(): invalid number of parameters"
473                exit 1
474        fi
475
476        local url=$1
477
478        echoAndLog "${FUNCNAME}(): downloading subversion code..."
479
480        /usr/bin/svn export "${url}" opengnsys
481        if [ $? -ne 0 ]; then
482                errorAndLog "${FUNCNAME}(): error getting code from ${url}, verify your user and password"
483                return 1
484        fi
485        echoAndLog "${FUNCNAME}(): subversion code downloaded"
486        return 0
487}
488
489
[892606b9]490############################################################
[7586ca3]491###  Detectar red
492############################################################
493
494function getNetworkSettings()
495{
496        # Variables globales definidas:
497        # - SERVERIP: IP local del servidor.
498        # - NETIP:    IP de la red.
499        # - NETMASK:  máscara de red.
500        # - NETBROAD: IP de difusión de la red.
501        # - ROUTERIP: IP del router.
502        # - DNSIP:    IP del servidor DNS.
503
504        echoAndLog "getNetworkSettings(): Detecting default network parameters."
[10023eb]505        SERVERIP=$(LANG=C ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | head -n1 | awk '{print $1}')
506        NETMASK=$(LANG=C ifconfig | grep 'Mask:'| grep -v '127.0.0.1' | cut -d: -f4 | head -n1 | awk '{print $1}')
507        NETBROAD=$(LANG=C ifconfig | grep 'Bcast:'| grep -v '127.0.0.1' | cut -d: -f3 | head -n1 | awk '{print $1}')
[13a01a7]508        NETIP=$(netstat -r | grep $NETMASK | head -n1 | awk '{print $1}')
[7586ca3]509        ROUTERIP=$(netstat -nr | awk '$1~/0\.0\.0\.0/ {print $2}')
[a555f49]510        DNSIP=$(awk '/nameserver/ {print $2}' /etc/resolv.conf | head -n1)
[7586ca3]511        if [ -z "$NETIP" -o -z "$NETMASK" ]; then
512                errorAndLog "getNetworkSettings(): Network not detected."
513                exit 1
514        fi
[cc7eab7]515
516        # Variables de ejecución de Apache
517        # - APACHE_RUN_USER
518        # - APACHE_RUN_GROUP
519        if [ -f /etc/apache2/envvars ]; then
520                source /etc/apache2/envvars
521        fi
522        APACHE_RUN_USER=${APACHE_RUN_USER:-"www-data"}
523        APACHE_RUN_GROUP=${APACHE_RUN_GROUP:-"www-data"}
[7586ca3]524}
525
526
527############################################################
[892606b9]528### Esqueleto para el Servicio pxe y contenedor tftpboot ###
529############################################################
530
531function tftpConfigure() {
532        echo "Configurando el servicio tftp"
533        basetftp=/var/lib/tftpboot
534
535        # reiniciamos demonio internet ????? porque ????
536        /etc/init.d/openbsd-inetd start
537
538        # preparacion contenedor tftpboot
539        cp -pr /usr/lib/syslinux/ ${basetftp}/syslinux
540        cp /usr/lib/syslinux/pxelinux.0 ${basetftp}
541        # prepamos el directorio de la configuracion de pxe
542        mkdir -p ${basetftp}/pxelinux.cfg
543        cat > ${basetftp}/pxelinux.cfg/default <<EOF
544DEFAULT pxe
545
546LABEL pxe
547KERNEL linux
548APPEND initrd=initrd.gz ip=dhcp ro vga=788 irqpoll acpi=on
549EOF
550        # comprobamos el servicio tftp
551        sleep 1
552        testPxe
553        ## damos perfimos de lectura a usuario web.
[cc7eab7]554        chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP ${basetftp}
[892606b9]555}
556
557function testPxe () {
558        cd /tmp
559        echo "comprobando servicio pxe ..... Espere"
560        tftp -v localhost -c get pxelinux.0 /tmp/pxelinux.0 && echo "servidor tftp OK" || echo "servidor tftp KO"
561        cd /
562}
563
564########################################################################
[b6906f7]565## Configuracion servicio NFS
[892606b9]566########################################################################
567
[13a01a7]568# function nfsConfigure ()
569# {
570#         echoAndLog "${FUNCNAME}(): Sample NFS Configuration."
571#         sed -e "s/NETIP/$NETIP/g" -e "s/NETMASK/$NETMASK/g" $WORKDIR/opengnsys/server/NFS/exports  >> /etc/exports
572#       /etc/init.d/nfs-kernel-server restart
573#       exportfs -va
574#         echoAndLog "${FUNCNAME}(): Sample NFS Configured in file \"/etc/exports\"."
575# }
576
577# ADVERTENCIA: usa variables globales NETIP y NETMASK!
578function nfsConfigure()
[7586ca3]579{
[13a01a7]580        echoAndLog "${FUNCNAME}(): Config nfs server."
581
582        backupFile /etc/exports
583
584        nfsAddExport /opt/opengnsys/client ${NETIP}/${NETMASK}:ro,no_subtree_check,no_root_squash,sync
585        if [ $? -ne 0 ]; then
586                errorAndLog "${FUNCNAME}(): error while adding nfs client config"
587                return 1
588        fi
589
590        nfsAddExport /opt/opengnsys/images ${NETIP}/${NETMASK}:rw,no_subtree_check,no_root_squash,sync,crossmnt
591        if [ $? -ne 0 ]; then
592                errorAndLog "${FUNCNAME}(): error while adding nfs images config"
593                return 1
594        fi
595
596        nfsAddExport /opt/opengnsys/log/clients ${NETIP}/${NETMASK}:rw,no_subtree_check,no_root_squash,sync
597        if [ $? -ne 0 ]; then
598                errorAndLog "${FUNCNAME}(): error while adding logging client config"
599                return 1
600        fi
601
[7586ca3]602        /etc/init.d/nfs-kernel-server restart
[13a01a7]603
[b6906f7]604        exportfs -va
[13a01a7]605        if [ $? -ne 0 ]; then
606                errorAndLog "${FUNCNAME}(): error while configure exports"
607                return 1
608        fi
609
610        echoAndLog "${FUNCNAME}(): Added NFS configuration to file \"/etc/exports\"."
611        return 0
[b6906f7]612}
[892606b9]613
[b6906f7]614
[13a01a7]615# ejemplos:
616#nfsAddExport /opt/opengnsys 192.168.0.0/255.255.255.0:ro,no_subtree_check,no_root_squash,sync
617#nfsAddExport /opt/opengnsys 192.168.0.0/255.255.255.0
618#nfsAddExport /opt/opengnsys 80.20.2.1:ro 192.123.32.2:rw
619function nfsAddExport()
620{
621        if [ $# -lt 2 ]; then
622                errorAndLog "${FUNCNAME}(): invalid number of parameters"
623                exit 1
624        fi
625
626        if [ ! -f /etc/exports ]; then
627                errorAndLog "${FUNCNAME}(): /etc/exports don't exists"
628                return 1
629        fi
630
631        local export="${1}"
632        local contador=0
633        local cadenaexport
634
635        grep "^${export}" /etc/exports > /dev/null
636        if [ $? -eq 0 ]; then
637                echoAndLog "${FUNCNAME}(): $export exists in /etc/exports, omiting"
638                return 0
639        fi
640
641        cadenaexport="${export}"
642        for parametro in $*
643        do
644                if [ $contador -gt 0 ]
645                then
646                        host=`echo $parametro | awk -F: '{print $1}'`
647                        options=`echo $parametro | awk -F: '{print $2}'`
648                        if [ "${host}" == "" ]; then
649                                errorAndLog "${FUNCNAME}(): host can't be empty"
650                                return 1
651                        fi
652                        cadenaexport="${cadenaexport}\t${host}"
653
654                        if [ "${options}" != "" ]; then
655                                cadenaexport="${cadenaexport}(${options})"
656                        fi
657                fi
658                let contador=contador+1
659        done
660
661        echo -en "$cadenaexport\n" >> /etc/exports
662
663        echoAndLog "${FUNCNAME}(): add $export to /etc/exports"
664
665        return 0
666}
667
[b6906f7]668########################################################################
669## Configuracion servicio DHCP
670########################################################################
671
[7586ca3]672function dhcpConfigure()
673{
[a555f49]674        echoAndLog "${FUNCNAME}(): Sample DHCP Configuration."
675
676        backupFile /etc/dhcp3/dhcpd.conf
677
[7586ca3]678        sed -e "s/SERVERIP/$SERVERIP/g" \
679            -e "s/NETIP/$NETIP/g" \
680            -e "s/NETMASK/$NETMASK/g" \
681            -e "s/NETBROAD/$NETBROAD/g" \
682            -e "s/ROUTERIP/$ROUTERIP/g" \
683            -e "s/DNSIP/$DNSIP/g" \
684            $WORKDIR/opengnsys/server/DHCP/dhcpd.conf > /etc/dhcp3/dhcpd.conf
[a555f49]685        if [ $? -ne 0 ]; then
686                errorAndLog "${FUNCNAME}(): error while configuring dhcp server"
687                return 1
688        fi
689
[7586ca3]690        /etc/init.d/dhcp3-server restart
[a555f49]691        echoAndLog "${FUNCNAME}(): Sample DHCP Configured in file \"/etc/dhcp3/dhcpd.conf\"."
692        return 0
[892606b9]693}
694
695
[a01156a]696#####################################################################
697####### Funciones específicas de la instalación de Opengnsys
698#####################################################################
699
[7586ca3]700# Copiar ficheros del OpenGNSys Web Console.
701function installWebFiles()
702{
703        echoAndLog "installWebFiles(): Installing web files..."
704        cp -ar $WORKDIR/opengnsys/admin/WebConsole/* $INSTALL_TARGET/www   #*/ comentario para doxigen
705        if [ $? != 0 ]; then
706                errorAndLog "installWebFiles(): Error copying web files."
707                exit 1
708        fi
709        find $INSTALL_TARGET/www -name .svn -type d -exec rm -fr {} \; 2>/dev/null
710        # Cambiar permisos para ficheros especiales.
[cc7eab7]711        chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP \
712                        $INSTALL_TARGET/www/includes \
713                        $INSTALL_TARGET/www/comandos/gestores/filescripts \
714                        $INSTALL_TARGET/www/images/icons
[7586ca3]715        echoAndLog "installWebFiles(): Web files installed successfully."
716}
717
718# Configuración específica de Apache.
[892606b9]719function openGnsysInstallWebConsoleApacheConf()
[a01156a]720{
721        if [ $# -ne 2 ]; then
[892606b9]722                errorAndLog "openGnsysInstallWebConsoleApacheConf(): invalid number of parameters"
[a01156a]723                exit 1
724        fi
725
726        local path_opengnsys_base=$1
727        local path_apache2_confd=$2
[892606b9]728        local path_web_console=${path_opengnsys_base}/www
[a01156a]729
[892606b9]730        if [ ! -d $path_apache2_confd ]; then
731                errorAndLog "openGnsysInstallWebConsoleApacheConf(): path to apache2 conf.d can not found, verify your server installation"
732                return 1
733        fi
734
[7586ca3]735        mkdir -p $path_apache2_confd/{sites-available,sites-enabled}
[892606b9]736
737        echoAndLog "openGnsysInstallWebConsoleApacheConf(): creating apache2 config file.."
[a01156a]738
739        # genera configuración
[892606b9]740        cat > $path_opengnsys_base/etc/apache.conf <<EOF
[cc7eab7]741# OpenGNSys Web Console configuration for Apache
[a01156a]742
[892606b9]743Alias /opengnsys ${path_web_console}
[a01156a]744
[892606b9]745<Directory ${path_web_console}>
[a01156a]746        Options -Indexes FollowSymLinks
747        DirectoryIndex acceso.php
748</Directory>
749EOF
750
[7586ca3]751        ln -fs $path_opengnsys_base/etc/apache.conf $path_apache2_confd/sites-available/opengnsys.conf
752        ln -fs $path_apache2_confd/sites-available/opengnsys.conf $path_apache2_confd/sites-enabled/opengnsys.conf
[a01156a]753        if [ $? -ne 0 ]; then
[892606b9]754                errorAndLog "openGnsysInstallWebConsoleApacheConf(): config file can't be linked to apache conf, verify your server installation"
[a01156a]755                return 1
756        else
[077dd7c5]757                echoAndLog "openGnsysInstallWebConsoleApacheConf(): config file created and linked, restarting apache daemon"
758                /etc/init.d/apache2 restart
[a01156a]759                return 0
760        fi
761}
762
763# Crea la estructura base de la instalación de opengnsys
[318efac]764function openGnsysInstallCreateDirs()
[a01156a]765{
766        if [ $# -ne 1 ]; then
767                errorAndLog "openGnsysInstallCreateDirs(): invalid number of parameters"
768                exit 1
769        fi
770
771        local path_opengnsys_base=$1
772
773        echoAndLog "openGnsysInstallCreateDirs(): creating directory paths in $path_opengnsys_base"
774
775        mkdir -p $path_opengnsys_base
[077dd7c5]776        mkdir -p $path_opengnsys_base/admin/{autoexec,comandos,menus,usuarios}
[a01156a]777        mkdir -p $path_opengnsys_base/bin
[5c33840]778        mkdir -p $path_opengnsys_base/client
779        mkdir -p $path_opengnsys_base/etc
[a01156a]780        mkdir -p $path_opengnsys_base/lib
[1cc5697]781        mkdir -p $path_opengnsys_base/log/clients
[7586ca3]782        mkdir -p $path_opengnsys_base/sbin
[a01156a]783        mkdir -p $path_opengnsys_base/www
[5c33840]784        mkdir -p $path_opengnsys_base/images
[b6906f7]785        ln -fs /var/lib/tftpboot $path_opengnsys_base
786        ln -fs $path_opengnsys_base/log /var/log/opengnsys
[5c33840]787
[a01156a]788        if [ $? -ne 0 ]; then
789                errorAndLog "openGnsysInstallCreateDirs(): error while creating dirs. Do you have write permissions?"
790                return 1
791        fi
792
793        echoAndLog "openGnsysInstallCreateDirs(): directory paths created"
794        return 0
795}
796
[463a1d49]797# Copia ficheros de configuración y ejecutables genéricos del servidor.
[318efac]798function openGnsysCopyServerFiles () {
[463a1d49]799        if [ $# -ne 1 ]; then
[879689f]800                errorAndLog "${FUNCNAME}(): invalid number of parameters"
[463a1d49]801                exit 1
802        fi
803
804        local path_opengnsys_base=$1
805
[892606b9]806        local SOURCES=( client/boot/initrd-generator \
[b6906f7]807                        client/boot/upgrade-clients-udeb.sh \
[a555f49]808                        client/boot/udeblist.conf  \
809                        client/boot/udeblist-jaunty.conf  \
[879689f]810                        client/boot/udeblist-karmic.conf \
811                        server/PXE/pxelinux.cfg/default )
[892606b9]812        local TARGETS=( bin/initrd-generator \
[b6906f7]813                        bin/upgrade-clients-udeb.sh \
[a555f49]814                        etc/udeblist.conf \
815                        etc/udeblist-jaunty.conf  \
[879689f]816                        etc/udeblist-karmic.conf \
817                        tftpboot/pxelinux.cfg/default )
[463a1d49]818
819        if [ ${#SOURCES[@]} != ${#TARGETS[@]} ]; then
[879689f]820                errorAndLog "${FUNCNAME}(): inconsistent number of array items"
[463a1d49]821                exit 1
822        fi
823
[879689f]824        echoAndLog "${FUNCNAME}(): copying files to server directories"
[f2bb433]825
[7586ca3]826        pushd $WORKDIR/opengnsys
[463a1d49]827        local i
828        for (( i = 0; i < ${#SOURCES[@]}; i++ )); do
829                if [ -f "${SOURCES[$i]}" ]; then
[879689f]830                        echoAndLog "Copying ${SOURCES[$i]} to $path_opengnsys_base/${TARGETS[$i]}"
[463a1d49]831                        cp -p "${SOURCES[$i]}" "${path_opengnsys_base}/${TARGETS[$i]}"
832                fi
833                if [ -d "${SOURCES[$i]}" ]; then
[879689f]834                        echoAndLog "Copying content of ${SOURCES[$i]} to $path_opengnsys_base/${TARGETS[$i]}"
[7586ca3]835                        cp -ar "${SOURCES[$i]}/*" "${path_opengnsys_base}/${TARGETS[$i]}"
[463a1d49]836                fi
837        done
[7586ca3]838        popd
[892606b9]839}
840
[7586ca3]841####################################################################
842### Funciones de compilación de códifo fuente de servicios
843####################################################################
844
[b6906f7]845# Compilar los servicios de OpenGNsys
[7586ca3]846function servicesCompilation ()
847{
[13a01a7]848        local hayErrores=0
[0795938]849
[b6906f7]850        # Compilar OpenGNSys Server
[13a01a7]851        echoAndLog "${FUNCNAME}(): Compiling OpenGNSys Admin Server"
[318efac]852        pushd $WORKDIR/opengnsys/admin/Services/ogAdmServer
[b6906f7]853        make && make install
[13a01a7]854        if [ $? -ne 0 ]; then
855                echoAndLog "${FUNCNAME}(): error while compiling OpenGNSys Admin Server"
856                hayErrores=1
857        fi
[7586ca3]858        popd
[b6906f7]859        # Compilar OpenGNSys Repository Manager
[13a01a7]860        echoAndLog "${FUNCNAME}(): Compiling OpenGNSys Repository Manager"
[318efac]861        pushd $WORKDIR/opengnsys/admin/Services/ogAdmRepo
[b6906f7]862        make && make install
[13a01a7]863        if [ $? -ne 0 ]; then
864                echoAndLog "${FUNCNAME}(): error while compiling OpenGNSys Repository Manager"
865                hayErrores=1
866        fi
[8125e7c]867        popd
[b6906f7]868        # Compilar OpenGNSys Client
869        echoAndLog "servicesCompilation(): Compiling OpenGNSys Admin Client"
[318efac]870        pushd $WORKDIR/opengnsys/admin/Services/ogAdmClient
871        make && mv ogAdmClient ../../../client/nfsexport/bin
[13a01a7]872        if [ $? -ne 0 ]; then
873                echoAndLog "${FUNCNAME}(): error while compiling OpenGNSys Admin Client"
874                hayErrores=1
875        fi
[318efac]876        popd
[13a01a7]877
878        return $hayErrores
[b6906f7]879}
880
881
[892606b9]882####################################################################
883### Funciones instalacion cliente opengnsys
884####################################################################
885
[a555f49]886function openGnsysClientCreate()
[7586ca3]887{
888        local OSDISTRIB OSCODENAME
[892606b9]889
[a555f49]890        local hayErrores=0
891
892        echoAndLog "${FUNCNAME}(): Copying OpenGNSys Client files."
[892606b9]893        cp -ar $WORKDIR/opengnsys/client/nfsexport/* $INSTALL_TARGET/client
[b6906f7]894        find $INSTALL_TARGET/client -name .svn -type d -exec rm -fr {} \; 2>/dev/null
[23388bd5]895        chmod +x $INSTALL_TARGET/client/admin/scripts/*
[a555f49]896        echoAndLog "${FUNCNAME}(): Copying OpenGNSys Cloning Engine files."
[b6906f7]897        mkdir -p $INSTALL_TARGET/client/lib/engine/bin
[892606b9]898        cp -ar $WORKDIR/opengnsys/client/engine/*.lib $INSTALL_TARGET/client/lib/engine/bin
[a555f49]899        if [ $? -ne 0 ]; then
900                errorAndLog "${FUNCNAME}(): error while copying engine files"
901                hayErrores=1
902        fi
[892606b9]903
[cc7eab7]904        # Cargar Kernel, Initrd y paquetes udeb para la distribución del servidor (o por defecto).
[d345fa6]905        OSDISTRIB=$(lsb_release -i | awk -F: '{sub(/\t/,""); print $2}') 2>/dev/null
906        OSCODENAME=$(lsb_release -c | awk -F: '{sub(/\t/,""); print $2}') 2>/dev/null
[7586ca3]907        if [ "$OSDISTRIB" = "Ubuntu" -a -n "$OSCODENAME" ]; then
[a555f49]908                echoAndLog "${FUNCNAME}(): Loading Kernel and Initrd files for $OSDISTRIB $OSCODENAME."
[7586ca3]909                $INSTALL_TARGET/bin/initrd-generator -t $INSTALL_TARGET/tftpboot -v "$OSCODENAME"
[a555f49]910                if [ $? -ne 0 ]; then
911                        errorAndLog "${FUNCNAME}(): error while generating initrd OpenGNSys Admin Client"
912                        hayErrores=1
913                fi
914                echoAndLog "${FUNCNAME}(): Loading udeb files for $OSDISTRIB $OSCODENAME."
[7586ca3]915                $INSTALL_TARGET/bin/upgrade-clients-udeb.sh "$OSCODENAME"
[a555f49]916                if [ $? -ne 0 ]; then
917                        errorAndLog "${FUNCNAME}(): error while upgrading udeb files OpenGNSys Admin Client"
918                        hayErrores=1
919                fi
[7586ca3]920        else
[a555f49]921                echoAndLog "${FUNCNAME}(): Loading default Kernel and Initrd files."
[7586ca3]922                $INSTALL_TARGET/bin/initrd-generator -t $INSTALL_TARGET/tftpboot/
[a555f49]923                if [ $? -ne 0 ]; then
924                        errorAndLog "${FUNCNAME}(): error while generating initrd OpenGNSys Admin Client"
925                        hayErrores=1
926                fi
927                echoAndLog "${FUNCNAME}(): Loading default udeb files."
[7586ca3]928                $INSTALL_TARGET/bin/upgrade-clients-udeb.sh
[a555f49]929                if [ $? -ne 0 ]; then
930                        errorAndLog "${FUNCNAME}(): error while upgrading udeb files OpenGNSys Admin Client"
931                        hayErrores=1
932                fi
933        fi
934
935        if [ $hayErrores -eq 0 ]; then
936                echoAndLog "${FUNCNAME}(): Client generation success."
937        else
938                errorAndLog "${FUNCNAME}(): Client generation with errors"
[7586ca3]939        fi
[a555f49]940
941        return $hayErrores
[463a1d49]942}
943
944
[cc7eab7]945# Configuración básica de servicios de OpenGNSys
946function openGnsysConfigure()
947{
948        echoAndLog "openGnsysConfigure(): Copying init files."
949        cp -p $WORKDIR/opengnsys/admin/Services/opengnsys.init /etc/init.d/opengnsys
950        cp -p $WORKDIR/opengnsys/admin/Services/opengnsys.default /etc/default/opengnsys
951        update-rc.d opengnsys defaults
952        echoAndLog "openGnsysConfigure(): Creating OpenGNSys config file in \"$INSTALL_TARGET/etc\"."
[1a22cd2]953        perl -pi -e "s/SERVERIP/$SERVERIP/g" $INSTALL_TARGET/etc/ogAdmServer.cfg
954        perl -pi -e "s/SERVERIP/$SERVERIP/g" $INSTALL_TARGET/etc/ogAdmRepo.cfg
955        sed -e "s/SERVERIP/$SERVERIP/g" $WORKDIR/opengnsys/admin/Services/ogAdmClient/ogAdmClient.cfg > $INSTALL_TARGET/client/etc/ogAdmClient.cfg
956        echoAndLog "openGnsysConfigure(): Creating Web Console config file"
[077dd7c5]957        perl -pi -e "s/SERVERIP/$SERVERIP/g; s/OPENGNSYSURL/http:\/\/$SERVERIP\/opengnsys/g" $INSTALL_TARGET/www/controlacceso.php
[180a07dd]958        OPENGNSYS_CONSOLEURL=$(awk -F\" '$1~/\$wac/ {print $2}' $INSTALL_TARGET/www/controlacceso.php)
[cc7eab7]959        echoAndLog "openGnsysConfiguration(): Starting OpenGNSys services."
960        /etc/init.d/opengnsys start
961}
962
[b6906f7]963
[a01156a]964#####################################################################
[180a07dd]965#######  Función de resumen informativo de la instalación
966#####################################################################
967
968function installationSummary(){
969        echo
970        echoAndLog "OpenGNSys Installation Summary"
971        echo       "=============================="
972        echoAndLog "OpenGNSys installation directory: $INSTALL_TARGET"
973        echoAndLog "OpenGNSys repository directory:   $INSTALL_TARGET/images"
974        echoAndLog "TFTP configuracion directory:     /var/lib/tftpboot"
975        echoAndLog "DHCP configuracion file:          /etc/dhcp3/dhcpd.conf"
976        echoAndLog "NFS configuracion file:           /etc/exports"
977        echoAndLog "OpenGNSys Web Console URL:        $OPENGNSYS_CONSOLEURL"
978        echoAndLog "Web Console admin user:           $OPENGNSYS_DB_USER"
979        echoAndLog "Web Console admin password:       $OPENGNSYS_DB_PASSWD"
[c5ce04c]980        echoAndLog "Web Console default user:         $OPENGNSYS_DB_DEFAULTUSER"
981        echoAndLog "Web Console default password:     $OPENGNSYS_DB_DEFAULTPASSWD"
[180a07dd]982        echo
983        echoAndLog "Post-Installation Instructions:"
984        echo       "==============================="
985        echoAndLog "Review or edit all configuration files."
[c5ce04c]986        echoAndLog "Insert DHCP configuration data and restart service."
[180a07dd]987        echoAndLog "Log-in as Web Console admin user."
[c5ce04c]988        echoAndLog " - Review default Organization data and default user."
[180a07dd]989        echoAndLog "Log-in as Web Console organization user."
[c5ce04c]990        echoAndLog " - Insert OpenGNSys data (rooms, computers, etc)."
[180a07dd]991echo
992}
993
994
995
996#####################################################################
[b6906f7]997####### Proceso de instalación de OpenGNSys
[a01156a]998#####################################################################
999
[7586ca3]1000
[cc7eab7]1001echoAndLog "OpenGNSys installation begins at $(date)"
1002
[7586ca3]1003# Detectar parámetros de red por defecto
1004getNetworkSettings
1005if [ $? -ne 0 ]; then
1006        errorAndLog "Error reading default network settings."
1007        exit 1
1008fi
1009
[318efac]1010# Actualizar repositorios
1011apt-get update
1012
[b6906f7]1013# Instalación de dependencias (paquetes de sistema operativo).
[a01156a]1014declare -a notinstalled
1015checkDependencies DEPENDENCIES notinstalled
1016if [ $? -ne 0 ]; then
1017        installDependencies notinstalled
1018        if [ $? -ne 0 ]; then
1019                echoAndLog "Error while installing some dependeces, please verify your server installation before continue"
1020                exit 1
1021        fi
1022fi
1023
[b6906f7]1024# Arbol de directorios de OpenGNSys.
[a01156a]1025openGnsysInstallCreateDirs ${INSTALL_TARGET}
1026if [ $? -ne 0 ]; then
1027        errorAndLog "Error while creating directory paths!"
1028        exit 1
1029fi
[b6906f7]1030
1031# Descarga del repositorio de código en directorio temporal
[13a01a7]1032#svnCheckoutCode $SVN_URL
1033svnExportCode $SVN_URL
[a01156a]1034if [ $? -ne 0 ]; then
1035        errorAndLog "Error while getting code from svn"
1036        exit 1
1037fi
1038
[b6906f7]1039# Compilar código fuente de los servicios de OpenGNSys.
1040servicesCompilation
[13a01a7]1041if [ $? -ne 0 ]; then
1042        errorAndLog "Error while compiling OpenGnsys services"
1043        exit 1
1044fi
[b6906f7]1045
1046# Configurando tftp
[318efac]1047tftpConfigure
[b6906f7]1048
1049# Configuración NFS
1050nfsConfigure
[13a01a7]1051if [ $? -ne 0 ]; then
1052        errorAndLog "Error while configuring nfs server!"
1053        exit 1
1054fi
[b6906f7]1055
1056# Configuración ejemplo DHCP
1057dhcpConfigure
[a555f49]1058if [ $? -ne 0 ]; then
1059        errorAndLog "Error while copying your dhcp server files!"
1060        exit 1
1061fi
[b6906f7]1062
1063# Copiar ficheros de servicios OpenGNSys Server.
[463a1d49]1064openGnsysCopyServerFiles ${INSTALL_TARGET}
1065if [ $? -ne 0 ]; then
1066        errorAndLog "Error while copying the server files!"
1067        exit 1
1068fi
1069
[b6906f7]1070# Instalar Base de datos de OpenGNSys Admin.
1071isInArray notinstalled "mysql-server"
1072if [ $? -eq 0 ]; then
1073        mysqlSetRootPassword ${MYSQL_ROOT_PASSWORD}
1074else
1075        mysqlGetRootPassword
1076
1077fi
[463a1d49]1078
[a01156a]1079mysqlTestConnection ${MYSQL_ROOT_PASSWORD}
1080if [ $? -ne 0 ]; then
1081        errorAndLog "Error while connection to mysql"
1082        exit 1
1083fi
[892606b9]1084mysqlDbExists ${MYSQL_ROOT_PASSWORD} ${OPENGNSYS_DATABASE}
[a01156a]1085if [ $? -ne 0 ]; then
[cc7eab7]1086        echoAndLog "Creating Web Console database"
[892606b9]1087        mysqlCreateDb ${MYSQL_ROOT_PASSWORD} ${OPENGNSYS_DATABASE}
[a01156a]1088        if [ $? -ne 0 ]; then
[cc7eab7]1089                errorAndLog "Error while creating Web Console database"
[a01156a]1090                exit 1
1091        fi
1092else
[cc7eab7]1093        echoAndLog "Web Console database exists, ommiting creation"
[a01156a]1094fi
1095
[892606b9]1096mysqlCheckUserExists ${MYSQL_ROOT_PASSWORD} ${OPENGNSYS_DB_USER}
[a01156a]1097if [ $? -ne 0 ]; then
1098        echoAndLog "Creating user in database"
[892606b9]1099        mysqlCreateAdminUserToDb ${MYSQL_ROOT_PASSWORD} ${OPENGNSYS_DATABASE} ${OPENGNSYS_DB_USER} "${OPENGNSYS_DB_PASSWD}"
[a01156a]1100        if [ $? -ne 0 ]; then
[cc7eab7]1101                errorAndLog "Error while creating database user"
[a01156a]1102                exit 1
1103        fi
1104
1105fi
1106
[892606b9]1107mysqlCheckDbIsEmpty ${MYSQL_ROOT_PASSWORD} ${OPENGNSYS_DATABASE}
[a01156a]1108if [ $? -eq 0 ]; then
1109        echoAndLog "Creating tables..."
[892606b9]1110        if [ -f $WORKDIR/$OPENGNSYS_DB_CREATION_FILE ]; then
1111                mysqlImportSqlFileToDb ${MYSQL_ROOT_PASSWORD} ${OPENGNSYS_DATABASE} $WORKDIR/$OPENGNSYS_DB_CREATION_FILE
[a01156a]1112        else
[892606b9]1113                errorAndLog "Unable to locate $WORKDIR/$OPENGNSYS_DB_CREATION_FILE!!"
[a01156a]1114                exit 1
1115        fi
1116fi
1117
1118# copiando paqinas web
[7586ca3]1119installWebFiles
[a01156a]1120
1121# creando configuracion de apache2
[892606b9]1122openGnsysInstallWebConsoleApacheConf $INSTALL_TARGET /etc/apache2
[a01156a]1123if [ $? -ne 0 ]; then
[7586ca3]1124        errorAndLog "Error configuring Apache for OpenGNSYS Admin"
[a01156a]1125        exit 1
1126fi
1127
1128popd
[892606b9]1129
1130# Creando la estructura del cliente
1131openGnsysClientCreate
[a555f49]1132if [ $? -ne 0 ]; then
1133        errorAndLog "Error creating clients"
1134        exit 1
1135fi
[892606b9]1136
[cc7eab7]1137# Configuración de servicios de OpenGNSys
1138openGnsysConfigure
[2308fc7]1139
[180a07dd]1140# Mostrar sumario de la instalación e instrucciones de post-instalación.
1141installationSummary
1142
[077dd7c5]1143#rm -rf $WORKDIR
[cc7eab7]1144echoAndLog "OpenGNSys installation finished at $(date)"
[2308fc7]1145
Note: See TracBrowser for help on using the repository browser.