Proyecto

General

Perfil

430 manumora
##############################################################################
# Project: Autoconfiguracion
# Purpose: Autoconfiguracion de ltsp-servers
# Language: Python / Bash
# Date: 13-Nov-2012.
# Authores: Manuel Mora Gordillo
# Francisco Damian Mendez Palma
#
# Copyright: 2012 - Manuel Mora Gordillo <manuel.mora.gordillo @nospam@ gmail.com>
# 2012 - Francisco Damian Mendez Palma <fmendezpalma @nospam@ gmail.com>
#
# Autoconfiguracion is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Autoconfiguracion is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Autoconfiguracion. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

Que hace el script:

- Cuando se inicia el equipo comprueba todas las interfaces de red hasta que consigue conectarse a la red troncal.
- Una vez conectado, con su mac consulta a ldap para saber a que aula pertenece ese equipo
- Sabiendo el aula al que pertenece, se descarga sus respectivos archivos (70-persistent-net.rules, aulalinex-profesor.conf y setup.ini)
- Se reinicia con todo perfectamente configurado

Pasos a seguir:

- Tener relación de confianza SSH entre el servidor NFS y todos los servidores de aula
- Hacer copia de los ficheros 70-persistent-net.rules, aulalinex-ltsp.conf y setup.ini con el script de Alfonso Pastor (he modificado el script para que además mueva el backup a servidor:/var/www/)
- Tras la ejecución del script, en el NFS debe quedar algo así:
/var/www/backupltsp/a01-pro/70-persistent-net.rules
/var/www/backupltsp/a01-pro/aulalinex-ltsp.conf
/var/www/backupltsp/a01-pro/setup.ini
/var/www/backupltsp/a02-pro/70-persistent-net.rules
/var/www/backupltsp/a02-pro/aulalinex-ltsp.conf
/var/www/backupltsp/a02-pro/setup.ini
y así sucesivamente...
- Instalar la nueva imagen ltsp-server en un servidor de aula
- Copiar el script "copiainicial" a /root/copiainicial y hacerlo ejecutable "chmod +x /root/copiainicial"
- Añadir al fichero /etc/rc.local la línea /root/copiainicial
- Instalar en el servidor de aula el paquete python-ldap
- Borrar el fichero /etc/udev/rules.d/70-persistent-net.rules
- Hacer de nuevo la imagen del servidor (con clonezilla o backharddi) para instalarla al resto de equipos