diff options
author | ramon <ramongomez@us.es> | 2013-01-29 09:43:58 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2013-01-29 09:43:58 +0000 |
commit | acfb07db514bc158947ee40bd86266a8d952028c (patch) | |
tree | a49fc3d225ee9f672f4256f66b09824182f3447d | |
parent | 49275c7c8ceb7cf75c168b9823667e24646f7857 (diff) |
Versión 1.0.5, #562: Instalador guarda el registro de instalación en el directorio {{{log}}} de OpenGnSys.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3501 a21b9725-9963-47de-94b9-378ad31fedc9
-rw-r--r-- | client/boot-tools/INSTALL.es.txt | 14 | ||||
-rwxr-xr-x | client/boot-tools/boottoolsfunctions.lib | 7 | ||||
-rw-r--r-- | client/boot-tools/includes/etc/initramfs-tools/modules | 13 | ||||
-rw-r--r-- | client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions | 58 | ||||
-rwxr-xr-x | client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh | 36 | ||||
-rw-r--r-- | client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.Xwindow | 4 | ||||
-rwxr-xr-x | client/shared/bin/browser2 | bin | 25407040 -> 0 bytes | |||
-rwxr-xr-x | installer/opengnsys_installer.sh | 8 |
8 files changed, 97 insertions, 43 deletions
diff --git a/client/boot-tools/INSTALL.es.txt b/client/boot-tools/INSTALL.es.txt index c65f5a27..e86997d0 100644 --- a/client/boot-tools/INSTALL.es.txt +++ b/client/boot-tools/INSTALL.es.txt @@ -30,6 +30,19 @@ find /tmp/opengnsys_installer/ -name .svn -type d -exec rm -fr {} \; 2>/dev/null #2. Ejecutar el instalador: /tmp/opengnsys_installer/opengnsys/client/boot-tools/boottoolsgenerator.sh; +Notas para ejecución del instalador en Ubuntu 12.10: +- Configuración openssh-client: + - *** ssh_config (Y/I/N/O/D/Z) [default=N] ? [intro] +- Mapa de caracteres: + - Pantalla "Configuring console-data": elegir "Select keymap from full list" + - Keymap: pc / qwerty / Spanish / Standard / Standard +- Clave publica del servidor + - verwrite (y/n)? [intro] +- Mapa de caracteres (repetición): + - Pantalla "Configuring console-data": + - Select keymap from full list + - pc / qwerty / Spanish / Standard / Standard, UTF-8, Combined - Latin; Slavic Cyrillic; Greek, Fixed, 16 + @@ -47,3 +60,4 @@ NOTA: boottollsfuncions.lib -> btogSetfsBase bootsoftwareinstall -> packages ->sw.testing + diff --git a/client/boot-tools/boottoolsfunctions.lib b/client/boot-tools/boottoolsfunctions.lib index b08dbbae..09ab220f 100755 --- a/client/boot-tools/boottoolsfunctions.lib +++ b/client/boot-tools/boottoolsfunctions.lib @@ -58,6 +58,13 @@ case "${1,,}" in OSARCH="i386" OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; + quantal) + OSDISTRIB="ubuntu" + OSCODENAME="quantal" + OSRELEASE="3.7.3-030703-generic" + uname -a | grep x86_64 > /dev/null && OSARCH="amd64" || OSARCH="i386" + OSHTTP="http://es.archive.ubuntu.com/ubuntu/" + ;; host | *) OSDISTRIB=$(lsb_release -is) OSCODENAME=$(lsb_release -cs) diff --git a/client/boot-tools/includes/etc/initramfs-tools/modules b/client/boot-tools/includes/etc/initramfs-tools/modules index 8bac1d4b..5dd1d722 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/modules +++ b/client/boot-tools/includes/etc/initramfs-tools/modules @@ -8,7 +8,12 @@ # # raid1 # sd_mod -vga16b -vesafb -fbcon - +# Kernel 3.2 video. +#vga16b +#vesafb +#fbcon +# Kernel 3.7 video. +uvesafb +# Kernel 3.7 meta-devices. +dm-raid +dm-multipath diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions index 5bd4c5db..60b5ce99 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions @@ -160,9 +160,10 @@ ogPostConfigureFS() #####echo "nameserver $ogdns" > /etc/resolv.conf #configuramos el dns posterior ubuntu 12.04 #####echo "nameserver $ogdns" > /etc/resolvconf/resolv.conf.d/tail - [ -n "${ogdns}" ] && mkdir -p /run/resolvconf - [ -n "${ogdns}" ] && touch /run/resolvconf/resolv.conf - [ -n "${ogdns}" ] && echo "nameserver $ogdns" > /run/resolvconf/resolv.conf + if [ -n "${ogdns}" ]; then + mkdir -p /run/resolvconf + echo "nameserver $ogdns" > /run/resolvconf/resolv.conf + fi #configuramos el uso del servicio http proxy [ -n "${ogproxy}" ] && export http_proxy="$ogproxy" @@ -495,20 +496,20 @@ else #echo "variable BOOTIF no exportada, intentamos detectar que interfaz se ha iniciado" IP=$ip #TODO Detectar que interfaz se ha iniciado - case ${IP} in + case "$IP" in none|off) - return 0 - ;; - ""|on|any) - # Bring up device - DEVICE=eth0 - ;; - dhcp|bootp|rarp|both) - DEVICE=eth0 - ;; - *) - DEVICE=`echo $IP | cut -f6 -d:` - ;; + return 0 + ;; + ""|on|any) + # Bring up device + DEVICE=eth0 + ;; + dhcp|bootp|rarp|both) + DEVICE=eth0 + ;; + *) + DEVICE=`echo $IP | cut -f6 -d:` + ;; esac fi if [ -z "${DEVICE}" ]; then @@ -516,12 +517,12 @@ if [ -z "${DEVICE}" ]; then ogConfigureNetworking fi -[ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ] && return 0 -#if [ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ]; then -# echo "variable DEVICE con valor $DEVICE y fichero /tmp/net-$DEVICE encontrados" +[ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ] && return 0 +#if [ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ]; then +# echo "variable DEVICE con valor $DEVICE y fichero /run/net-$DEVICE encontrados" # return 0 #else -# echo "variable DEVICE con valor $DEVICE encontrada, procedemos a configurala y a crear el fichero /tmp/net-$DEVICE" +# echo "variable DEVICE con valor $DEVICE encontrada, procedemos a configurala y a crear el fichero /run/net-$DEVICE" #fi # Activamos la interfaz antes de configurar. @@ -542,10 +543,10 @@ for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do # The NIC is to be configured if this file does not exist. # Ip-Config tries to create this file and when it succeds # creating the file, ipconfig is not run again. - if [ -e /tmp/net-"${DEVICE}".conf ]; then + if [ -e /run/net-"${DEVICE}".conf ]; then break; fi - case ${IP} in + case "$IP" in none|off) return 0 ;; @@ -578,16 +579,17 @@ done # source ipconfig output if [ -n "${DEVICE}" ]; then - . /tmp/net-${DEVICE}.conf - DEVICECFG="/tmp/net-${DEVICE}.conf" - export DEVICECFG export DEVICE + export DEVICECFG="/run/net-${DEVICE}.conf" + source $DEVICECFG echo "DEVICE=$DEVICE" >> $CFGINITRD echo "DEVICECFG=$DEVICECFG" >> $CFGINITRD - echo "exportando variable DEVICE con valor = $DEVICE y el DEVICECFG con valor $DEVICECFG" + echo "exportando variable DEVICE con valor = $DEVICE y DEVICECFG con valor $DEVICECFG" + # Compatibilidad con versiones anteriores. + ln -fs $DEVICECFG /tmp else - # source any interface as not exaclty specified - . /tmp/net-*.conf + # source any interface as not exaclty specified + source /run/net-*.conf fi } diff --git a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh index 738c5368..2a6f0fe2 100755 --- a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh +++ b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh @@ -15,28 +15,45 @@ ln -s /bin/true /sbin/initctl #Limpiamos y actualizamos los repositorios apt apt-get clean apt-get update +apt-get upgrade -y #Desactivamos el hook del oginitrd.img para evitar problemas, al final de este escripts se activará mv /etc/initramfs-tools/hooks/oghooks /etc/initramfs-tools/ # Preparamos el mtab necesario para la instalacion correcta de paquetes. -echo " /dev/sda1 / ext4 rw,errors=remount-ro 0 0 " > /etc/mtab +echo "/dev/sda1 / ext4 rw,errors=remount-ro 0 0" > /etc/mtab #Instalamos el kernel. #Deteccion de la versión y kernel a usar -export OSDISTRIB=$(lsb_release -i | awk -F: '{sub(/\t/,""); print $2}') 2>/dev/null -export OSCODENAME=$(cat /etc/lsb-release | grep CODENAME | awk -F= '{print $NF}') -export OSRELEASE=$(uname -a | awk '{print $3}') -uname -a | grep x86_64 > /dev/null && export OSARCH=amd64 || export OSARCH=i386 -export OSHTTP="http://es.archive.ubuntu.com/ubuntu/" +OGCLIENTCFG=${OGCLIENTCFG:-/tmp/ogclient.cfg} +[ -f $OGCLIENTCFG ] && source $OGCLIENTCFG +OSRELEASE=${OSRELEASE:-$(uname -a | awk '{print $3}')} +if [ -z "$OSARCH" ]; then + uname -a | grep x86_64 > /dev/null && OSARCH="amd64" || OSARCH="i386" +fi # inicio de la instalacion -apt-get -y --force-yes install linux-image-${OSRELEASE} linux-headers-${OSRELEASE} linux-image-$RELEASE +if [ "$OSRELEASE" == "3.7.3-030703-generic" ]; then + # Descargar e instalar Kernel 3.7. + mkdir -p /tmp/kernel + pushd /tmp/kernel + apt-get -y --force-yes install wget crda libnl-3-200 libnl-genl-3-200 wireless-regdb + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.3-raring/linux-image-3.7.3-030703-generic_3.7.3-030703.201301171415_$OSARCH.deb + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.3-raring/linux-image-extra-3.7.3-030703-generic_3.7.3-030703.201301171415_$OSARCH.deb + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.3-raring/linux-headers-3.7.3-030703-generic_3.7.3-030703.201301171415_$OSARCH.deb + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.3-raring/linux-headers-3.7.3-030703_3.7.3-030703.201301171415_all.deb + dpkg -i *.deb + popd + rm -fr /tmp/kernel +else + # Instalar Kernel del repositorio de paquetes. + apt-get -y --force-yes install linux-image-${OSRELEASE} linux-headers-${OSRELEASE} linux-image-$RELEASE +fi #Eliminamos cualquier busybox previo: antes del busybox -apt-get -y --force-yes remove busybox -apt-get -y --force-yes remove busybox-static +#apt-get -y --force-yes remove busybox +#apt-get -y --force-yes remove busybox-static #estos paquetes ofrecen interaccion. # si es actualización, ya existe el fichero /etc/ssh/ssh_config @@ -80,6 +97,7 @@ echo " " > /etc/mtab #localepurge #rm /var/lib/dbus/machine-id; rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl; #FIN ADV + apt-get clean apt-get autoclean apt-get autoremove diff --git a/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.Xwindow b/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.Xwindow index 68ea963d..35103d1b 100644 --- a/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.Xwindow +++ b/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.Xwindow @@ -8,4 +8,6 @@ install roxterm install gparted #xvesa en compilacion install openbox -install midori
\ No newline at end of file +install midori +# VESA Kernel 3.7 +install v86d diff --git a/client/shared/bin/browser2 b/client/shared/bin/browser2 Binary files differdeleted file mode 100755 index 08b77dbd..00000000 --- a/client/shared/bin/browser2 +++ /dev/null diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 3095fd12..367db4af 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -47,7 +47,8 @@ WORKDIR=/tmp/opengnsys_installer mkdir -p $WORKDIR INSTALL_TARGET=/opt/opengnsys -LOG_FILE=/tmp/opengnsys_installation.log +OGLOGFILE=$INSTALL_TARGET/log/opengnsys_installation.log +LOG_FILE=/tmp/$(basename $OGLOGFILE) # Base de datos OPENGNSYS_DB_CREATION_FILE=opengnsys/admin/Database/ogAdmBD.sql @@ -1110,6 +1111,10 @@ function createDirs() return 1 fi + # Mover el fichero de registro instalación al directorio de logs. + echoAndLog "${FUNCNAME}(): moving installation log file" + mv $LOG_FILE $OGLOGFILE && LOG_FILE=$OGLOGFILE + echoAndLog "${FUNCNAME}(): directory paths created" return 0 } @@ -1397,6 +1402,7 @@ function installationSummary() echo "==============================" echoAndLog "Project version: $(cat $VERSIONFILE 2>/dev/null)" echoAndLog "Installation directory: $INSTALL_TARGET" + echoAndLog "Installation log file: $LOG_FILE" echoAndLog "Repository directory: $INSTALL_TARGET/images" echoAndLog "DHCP configuration directory: $DHCPCFGDIR" echoAndLog "TFTP configuration directory: $TFTPCFGDIR" |