diff options
Diffstat (limited to 'client/boot-tools/includes/etc')
17 files changed, 0 insertions, 1501 deletions
diff --git a/client/boot-tools/includes/etc/apt/sources.list.debian b/client/boot-tools/includes/etc/apt/sources.list.debian deleted file mode 100644 index 31c10f50..00000000 --- a/client/boot-tools/includes/etc/apt/sources.list.debian +++ /dev/null @@ -1,8 +0,0 @@ -deb http://ftp.es.debian.org/debian/ OSCODENAME main contrib non-free - -deb http://security.debian.org/ OSCODENAME/updates main contrib non-free -deb-src http://security.debian.org/ OSCODENAME/updates main contrib non-free - -# DRBL -#deb http://free.nchc.org.tw/drbl-core drbl stable - diff --git a/client/boot-tools/includes/etc/apt/sources.list.ubuntu b/client/boot-tools/includes/etc/apt/sources.list.ubuntu deleted file mode 100644 index 51b19a41..00000000 --- a/client/boot-tools/includes/etc/apt/sources.list.ubuntu +++ /dev/null @@ -1,60 +0,0 @@ -deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted -deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted -## Major bug fix updates produced after the final release of the -## distribution. -deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted -deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team. Also, please note that software in universe WILL NOT receive any -## review or updates from the Ubuntu security team. -deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME universe -deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME universe -deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates universe -deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates universe - -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team, and may not be under a free licence. Please satisfy yourself as to -## your rights to use the software. Also, please note that software in -## multiverse WILL NOT receive any review or updates from the Ubuntu -## security team. -deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME multiverse -deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME multiverse -deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates multiverse -deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates multiverse - -## Uncomment the following two lines to add software from the 'backports' -## repository. -## N.B. software from this repository may not have been tested as -## extensively as that contained in the main release, although it includes -## newer versions of some applications which may provide useful features. -## Also, please note that software in backports WILL NOT receive any review -## or updates from the Ubuntu security team. -deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-backports main restricted universe multiverse -deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-backports main restricted universe multiverse - -## Uncomment the following two lines to add software from Canonical's -## 'partner' repository. -## This software is not part of Ubuntu, but is offered by Canonical and the -## respective vendors as a service to Ubuntu users. -# deb http://archive.canonical.com/ubuntu OSCODENAME partner -# deb-src http://archive.canonical.com/ubuntu OSCODENAME partner - - -deb http://security.ubuntu.com/ubuntu OSCODENAME-security main restricted -deb-src http://security.ubuntu.com/ubuntu OSCODENAME-security main restricted -deb http://security.ubuntu.com/ubuntu OSCODENAME-security universe -deb-src http://security.ubuntu.com/ubuntu OSCODENAME-security universe -deb http://security.ubuntu.com/ubuntu OSCODENAME-security multiverse -deb-src http://security.ubuntu.com/ubuntu OSCODENAME-security multiverse - - -deb http://archive.ubuntu.com/ubuntu OSCODENAME main -#deb http://free.nchc.org.tw/drbl-core drbl stable -deb http://free.nchc.org.tw/ubuntu OSCODENAME-security main restricted universe multiverse -#deb http://ppa.launchpad.net/freenx-team/ubuntu/ OSCODENAME main -#deb http://ppa.launchpad.net/randomaction/ppa/ubuntu OSCODENAME main -#deb-src http://ppa.launchpad.net/randomaction/ppa/ubuntu OSCODENAME main -# Ubuntu-ZFS -deb http://ppa.launchpad.net/zfs-native/stable/ubuntu OSCODENAME main -deb-src http://ppa.launchpad.net/zfs-native/stable/ubuntu OSCODENAME main - diff --git a/client/boot-tools/includes/etc/environment b/client/boot-tools/includes/etc/environment deleted file mode 100644 index bb529d99..00000000 --- a/client/boot-tools/includes/etc/environment +++ /dev/null @@ -1,4 +0,0 @@ -LC_TYPE=es_ES@euro -LC_ALL=es_ES@euro -LANG=es_ES@euro -LANGUAGE=es_ES@euro
\ No newline at end of file diff --git a/client/boot-tools/includes/etc/fstab b/client/boot-tools/includes/etc/fstab deleted file mode 100644 index d7473df4..00000000 --- a/client/boot-tools/includes/etc/fstab +++ /dev/null @@ -1,13 +0,0 @@ -# /etc/fstab: static file system information. -# -# Use 'blkid -o value -s UUID' to print the universally unique identifier -# for a device; this may be used with UUID= as a more robust way to name -# devices that works even if disks are added and removed. See fstab(5). -# -# <file system> <mount point> <type> <options> <dump> <pass> -proc /proc proc 0 0 -/dev/sda1 ext3 errors=remount-ro 0 1 - - - - diff --git a/client/boot-tools/includes/etc/initramfs-tools/hooks/oghooks b/client/boot-tools/includes/etc/initramfs-tools/hooks/oghooks deleted file mode 100755 index 6e58b79c..00000000 --- a/client/boot-tools/includes/etc/initramfs-tools/hooks/oghooks +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -e -# initramfs hook for OpenGnsys - -#@file oghooks -#@brief configuración initrd para OpenGnSys -#@warning -#@version 0.9 - estrucura opengnsys, bash-static, unionfs, atheros -#@author Antonio J. Doblas Viso. -#@date 2010/05/24 -#*/ - -PREREQ="og" - -# Output pre-requisites -prereqs() -{ - echo "$PREREQ" -} - -case "$1" in - prereqs) - prereqs - exit 0 - ;; -esac - - -. /usr/share/initramfs-tools/hook-functions - -mkdir -p ${DESTDIR}/scripts/og-top -mkdir -p ${DESTDIR}/scripts/og-premount -mkdir -p ${DESTDIR}/scripts/og-bottom -mkdir -p ${DESTDIR}/mnt/ -mkdir -p ${DESTDIR}/net/ -mkdir -p ${DESTDIR}/usr -mkdir -p ${DESTDIR}/var/lock -mkdir -p ${DESTDIR}/var/log -mkdir -p ${DESTDIR}/opt/opengnsys; -mkdir -p ${DESTDIR}/ogboot; -mkdir -p ${DESTDIR}/boot; - -# Insert basic binaries -copy_exec /bin/bash-static /bin/bash -copy_exec /usr/bin/unionfs-fuse -copy_exec /sbin/mount.cifs -#copy_exec /sbin/mount.smbfs -copy_exec /bin/lsmod - - -# Insert OpenGnsys Engine -#mkdir -p ${DESTDIR}/opt/opengnsys/lib/engine -#cp -prv /opt/opengnsys/client/lib/engine ${DESTDIR}/opt/opengnsys/lib/engine - -manual_add_modules cifs -#manual_add_modules smbfs -manual_add_modules atl1e -manual_add_modules squashfs -manual_add_modules md4 -manual_add_modules des_generic -manual_add_modules nls_utf8 - - - - diff --git a/client/boot-tools/includes/etc/initramfs-tools/modules b/client/boot-tools/includes/etc/initramfs-tools/modules deleted file mode 100644 index 78a25980..00000000 --- a/client/boot-tools/includes/etc/initramfs-tools/modules +++ /dev/null @@ -1,28 +0,0 @@ -# List of modules that you want to include in your initramfs. -# -# Syntax: module_name [args ...] -# -# You must run update-initramfs(8) to effect this change. -# -# Examples: -# -# raid1 -# sd_mod - -# Kernel 3.2 video. -#vga16b -#vesafb -#fbcon - -# Kernel 3.7+ video. -uvesafb - -# Generales -#usbcore -#uhci_hcd -#ehci_hcd -usbhid -usbmouse -mac-hid -arc4 -cmac diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt b/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt deleted file mode 100644 index 73b6a464..00000000 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -OpenGnsys Client 1.1.1-rc5 diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions deleted file mode 100644 index 4d96f7eb..00000000 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions +++ /dev/null @@ -1,840 +0,0 @@ -#/** -#@file ogfunctions.lib -#@brief Librería o clase para la gestion del sistema operativo de los clientes OpenGnsys. -#@class client -#@version 1.1.0 -#@warning License: GNU GPLv3+ -#*/ ## - - -#/** -# ogGetNetworkDevice -#@brief Devuelve el nombre de dispositivo de red correpondiente al índice indicado. -#@param int_devindex índice de dispositivo de red. -#@return str_devname nombre de dispositivo de red. -#@note Índice 0 debe corresponder a interfaz "lo" y a partir de 1 para las reales. -#@version 1.1.0 - Primera versión de la función. -#@author Ramón Gómez, ETSII Universidad de Sevilla -#@date 2016/04/20 -#*/ ## -ogGetNetworkDevice () -{ -# Mantener retrocompatibilidad con interfaces antiguas tipo eth. -case "$1" in - eth0) ind=1 ;; - eth1) ind=2 ;; - eth2) ind=3 ;; - *) ind="$1" ;; -esac -# Buscar el dispositivo del índice. -dev="" -for f in /sys/class/net/*/uevent; do - source $f - let aux=$IFINDEX-1 - [ "$ind" = "$INTERFACE" -o "$ind" = $aux ] && dev="$INTERFACE" -done -[ -n "$dev" ] && echo "$dev" -} - - -#/** -# ogExportKernelParameters -#@brief Exporta los parametros pasados al kernel -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.7 - Primera versión de la función. -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2010/05/24 -#@version 1.1.0 - Sustituir índice de interfaz de red por su dispositivo. -#@author Ramón Gómez, ETSII Universidad de Sevilla -#@date 2016/04/20 -#*/ ## -ogExportKernelParameters () -{ - GLOBAL="cat /proc/cmdline" - for i in `${GLOBAL}` - do - echo $i | grep "=" > /dev/null && export $i - done - # Sustituir índice de interfaz de red por su dispositivo. - DEVIND=$(echo "$ip" | cut -f6 -d:) - if [ -n "$DEVIND" ]; then - PRE=$(echo "$ip" | cut -f1-5 -d:) - POST=$(echo "$ip" | cut -f7- -d:) - DEVICE=$(ogGetNetworkDevice $DEVIND) - [ -n "$DEVICE" ] && export ip="$PRE:$DEVICE:${POST:-none}" - fi - return 0 -} - - -#/** -# ogChangeVideoResolution -#@brief Cambia la resolución de vídeo utilizando el parámetro "video" del Kernel -# (sustituye al parámetro "vga"). -#@note Formato del parámetro vídeo: video=DRIVER:RESXxRESY-BITS -#@note El valor por defecto es: video=uvesafb:640x480-16 -#@todo Control de errores en el foramto de la variable "video". -#@version 1.0.5 - Primera versión de la función. -#@author Ramón Gómez, ETSII Universidad de Sevilla -#@date 2013/02/18 -#*/ ## -ogChangeVideoResolution () -{ -# Variables locales. -local DRIVER MODE -# Mostrar resolución y driver por defecto si solo hay una opción disponible. -if [ $(grep -c "" /sys/class/graphics/fb0/modes) -eq 1 ]; then - echo "Default screen mode: $(cat /sys/class/graphics/fb0/modes),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp$(lsmod|awk '$1=="video" && $3>0 {printf " (%s)",$4}')." -else - # Obtener driver y resolución. - DRIVER="$(echo $video|cut -f1 -d:)" - MODE="$(echo $video|cut -f2 -d:)" - case "$DRIVER" in - # Cambiar resolución para driver "uvesafb". - uvesafb) - # Obtener modo por defecto si parámetro "video=uvesafb:D". - [ "$MODE" == "D" ] && MODE=$(awk -F: '$1=="D" {print $2; nextfile}' /sys/class/graphics/fb0/modes) - # Cambiar resolución según valor del parámetro "video". - grep ":$(echo ${MODE/p/}|cut -f1 -d-)p" /sys/class/graphics/fb0/modes | head -1 > /sys/class/graphics/fb0/mode 2>&1 - echo "$(echo $MODE|cut -f2 -d-)" > /sys/class/graphics/fb0/bits_per_pixel 2>&1 - echo "Screen mode: $(cat /sys/class/graphics/fb0/mode),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp." - ;; - # Resolución por defecto para el resto de casos. - *) echo "Unknown video driver, using default mode." - ;; - esac -fi -} - - -#/** -# ogExportVarEnvironment -#@brief Exporta las variables usadas en el proceso de inicio OpenGnsys y las almacena en /tmp -#@param -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2011/05/24 -#*/ ## -ogExportVarEnvironment () -{ - export CFGINITRD="/tmp/initrd.cfg" - OGPROTOCOL="${ogprotocol:-smb}" - [ "$ogunit" != "" ] && OGUNIT="/$ogunit" - # OPTIONS Para samba y local (a nfs no le afecta) - export OPTIONS=" -o user=opengnsys,pass=og" - DEFOGLIVE="ogclient" - export OGLIVEDIR="${oglivedir:-$DEFOGLIVE}" && echo "OGLIVEDIR=$OGLIVEDIR" >> $CFGINITRD - case "$OGPROTOCOL" in - nfs|NFS) - export SRCOGLIVE="/var/lib/tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD - export SRCOGSHARE="/opt/opengnsys/client" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD - export SRCOGLOG="/opt/opengnsys/log/clients" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD - export SRCOGIMAGES="/opt/opengnsys/images$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD - ;; - smb|SMB|cifs|CIFS|samba|SAMBA) - export SRCOGLIVE="tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD - export SRCOGSHARE="ogclient" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD - export SRCOGLOG="oglog" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD - export SRCOGIMAGES="ogimages$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD - ;; - local|LOCAL) - # Ponemos variables SRC compatibles con smb y nfs. - export SRCOGLIVE="local" - export SRCOGSHARE="client" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD - export SRCOGLOG="log" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD - export SRCOGIMAGES="images" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD - ;; - esac - #punto de acceso al boot-tools live - export DSTOGLIVE="/opt/oglive/tftpboot" - #punto de montaje para unionfs - export OGLIVERAMFS="/opt/oglive/ramfs" && echo "OGLIVERAMFS=$OGLIVERAMFS" >> $CFGINITRD - #punto de montaje donde se accede al 2nd FS mediante loop - export OGLIVEROOTFS="/opt/oglive/rootfs" && echo "OGLIVEROOTFS=$OGLIVEROOTFS" >> $CFGINITRD - #punto de union entre LOCALROOTIMG y LOCALROOTRAM - export OGLIVEUNIONFS="/opt/oglive/unionfs" && echo "OGLIVEUNIONFS=$OGLIVEUNIONFS" >> $CFGINITRD - #etiquta para los dispositivos offline - export OGLIVELABEL="ogClient" - - #echo "puntos de montajes para los demas accesos" - #echo "acceso al client, engine, scritps, interfaz" - export DSTOGSHARE="/opt/opengnsys" && echo "DSTOGSHARE=$DSTOGSHARE" >> $CFGINITRD - export DSTOGLOG="/opt/opengnsys/log" && echo "DSTOGLOG=$DSTOGLOG" >> $CFGINITRD - export DSTOGIMAGES="/opt/opengnsys/images" && echo "DSTOGIMAGES=$DSTOGIMAGES" >> $CFGINITRD - - ##INFORMACION DE OTRAS VARIABLES OBTENDIAS EN OTRAS FUNCIONES ogConfigureNetwork. - #DEVICE - #IPV4DDR - #IPV4BROADCAST - #IPV4NETMASK - #IPV4GATEWAY - #HOSTNAME - #INFORMACION de otras variasbles obteneidas desde ogGetROOTSERVER - #ROOTSERVER si ip=dhcp -> ROOTSERVER=NEXT-SERVER; si ip=host:rootserver:gw:mask:hostname:interfaz -> ROOTSERVER=rootserver - #BOOTIF -> si el gestor remoto es pxelinux.0 y se añade una linea más tipo "IPAPPEND 2" esta variable tendrá la mac de la interfaz. - #$OGSERVERLIVE - #$OGSERVERSHARE - #$OGSERVERLOG - #$OGSERVERIMAGES - return 0 -} - - -#/** -# ogConfigureRamfs -#@brief Configura el initrd para adaptarlo al sistema raiz. -#@param -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2010/05/24 -#*/ ## -ogConfigureRamfs () -{ - mkdir -p $DSTOGLIVE - mkdir -p $OGLIVERAMFS - mkdir -p $OGLIVEROOTFS - mkdir -p $OGLIVEUNIONFS - - touch /etc/fstab -} - - -#/** -# ogLoadNetModule -#@brief Carga en un demerminado modulo de red, requiere compilación previo del modulo -#@param -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2010/05/24 -#*/ ## -ogLoadNetModule () -{ - if [ -n "$ognetmodule" ] - then - echo "Cargando modulo de red $ognetmodule" - modprobe ${ognetmodule} - fi -} - - -#/** -# ogPostConfigureFS -#@brief Configura el sistema raiz, para independizarlo entre los clientes. -#@param -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2010/05/24 -#*/ ## -ogPostConfigureFS() -{ - # configuramos el /etc/hostname. - echo $HOSTNAME > /etc/hostname - - #configuramos el /etc/hosts - echo "127.0.0.1 localhost" > /etc/hosts - echo "$IPV4ADDR $HOSTNAME" >> /etc/hosts - - #configuramos el host.conf - echo "order hosts,bind" > /etc/host.conf - echo "multi on" >> /etc/host.conf - - #configuramos el dns anterior ubuntu 12.04 (parámetro del Kernel "ogdns=IP_DNS") - if [ -n "$ogdns" ]; then - mkdir -p /run/resolvconf - echo "nameserver $ogdns" > /run/resolvconf/resolv.conf - fi - - #configuramos el uso del servicio http proxy (parámetro del Kernel "ogproxy=URL_Proxy") - if [ -n "${ogproxy}" ]; then - export http_proxy="$ogproxy" - export https_proxy="$ogproxy" - export ftp_proxy="$ogproxy" - export ftps_proxy="$ogproxy" - fi - - # configuramos el /etc/networks - #read -e NETIP NETDEFAULT <<<$(route -n | grep eth0 | awk -F" " '{print $1}') - NETIP=$(route -n | grep eth0 | awk -F" " '{print $1}') && NETIP=$(echo $NETIP | cut -f1 -d" ") - echo "default 0.0.0.0" > /etc/networks - echo "loopback 127.0.0.0" >> /etc/networks - echo "link-local 169.254.0.0" >> /etc/networks - echo "localnet $NETIP" >> /etc/networks - #route - - #echo "ogLive1.0.2" > /etc/debian_chroot - - #enlace si iniciamos desde ogprotocolo=local { cdrom, usb, cache } . - # monta el raiz del dispositivo local en /opt/og2fs/tftpboot - acceso al fichero .sqfs - # y monta el sistema root sqfs en /opt/og2fs/2ndfs - #[ "$LOCALMEDIA" == "CACHE" ] && ln -s $DSTOGLIVE /opt/opengnsys/cache - #[ "$ogprotocol" == "local" ] && ln -s ${OGLIVEROOTFS}/opt/opengnsys/* /opt/opengnsys/ - if [ "$ogprotocol" == "local" ]; then - # Creamos los subdirectorios de /opt/opengnsys/ - [ "$ogstatus" == "offline" ] && ln -s ${OGLIVEROOTFS}/opt/opengnsys/* /opt/opengnsys/ - # Montamos CACHE - # Si existe particion identificada como CACHE se monta. - DEVICECACHE=$(blkid -L "CACHE") - if [ "$DEVICECACHE" != "" ]; then - # Se monta diferente segun el dispositivo de cache igual o no al de ogclient. - DEVICEOGLIVE=$(df |grep $DSTOGLIVE|awk '{print $1}') - if [[ "$DEVICECACHE" == "*$DEVICEOGLIVE*" ]];then - mount --bind $DSTOGLIVE /opt/opengnsys/cache - else - mount $DEVICECACHE /opt/opengnsys/cache - fi - if [ "$ogstatus" == "offline" ]; then - [ -d /opt/opengnsys/cache/log ] || mkdir /opt/opengnsys/cache/log - mount --bind /opt/opengnsys/cache/log /opt/opengnsys/log - fi - fi - # Montamos REPO - if [ "$ogstatus" == "offline" ]; then - # Si estatus distinto de online buscamos un dispositivo con etiqueta repo - # y si no existe montamos la cache como repo (si existe). - TYPE=$(blkid | grep REPO | awk -F"TYPE=" '{print $2}' | tr -d \") - if [ "$TYPE" == "" ]; then - [ -d "/opt/opengnsys/cache$DSTOGIMAGES" ] && mount --bind /opt/opengnsys/cache$DSTOGIMAGES $DSTOGIMAGES - else - mount -t $TYPE LABEL=REPO $DSTOGIMAGES &>/dev/null - fi - fi - fi - - #Montamos un directorio temporal para permitir instalacion de softare desde el comando apt-get (parametor kernel "ogtmpfs=50" valor en megas - ogtmpfs="${ogtmpfs:-15}" - mount tmpfs /var/cache/apt/archives -t tmpfs -o size=${ogtmpfs}M - mkdir -p /var/cache/apt/archives/partial -} - - -#/** -# ogGetROOTSERVER -#@brief Determina los puntos de accesos a los distintos recursos. -#Requiere ogConfigureNetworking. -#Exporta ROOTSERVER -# si la red ha sido configurada con dhcp el valor de ROOTSERVER será el valor de next-server del dhcp -# si la red ha sido configurada con el parametro de kernel ip, será el segundo valor. -## ip=iphost:ipnext-server:ipgateway:netmask:hostname:iface:none -## ip=172.17.36.21:62.36.225.150:172.17.36.254:255.255.255.0:prueba1:eth0:none -#@param -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2010/05/24 -#*/ ## -ogGetROOTSERVER () -{ - # get nfs root from dhcp - if [ "x${NFSROOT}" = "xauto" ]; then - # check if server ip is part of dhcp root-path - if [ "${ROOTPATH#*:}" = "${ROOTPATH}" ]; then - NFSROOT=${ROOTSERVER}:${ROOTPATH} - else - NFSROOT=${ROOTPATH} - fi - - # nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] - elif [ -n "${NFSROOT}" ]; then - # nfs options are an optional arg - if [ "${NFSROOT#*,}" != "${NFSROOT}" ]; then - NFSOPTS="-o ${NFSROOT#*,}" - fi - NFSROOT=${NFSROOT%%,*} - if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then - NFSROOT=${ROOTSERVER}:${NFSROOT} - fi - fi - export ROOTSERVER - echo "ROOTSERVER=$ROOTSERVER" >> $CFGINITRD - - #si oglive no oglive=R - export OGSERVERIMAGES="${ogrepo:-$ROOTSERVER}" && echo "OGSERVERIMAGES=$OGSERVERIMAGES" >> $CFGINITRD - export OGSERVERSHARE="${ogshare:-$ROOTSERVER}" && echo "OGSERVERSHARE=$OGSERVERSHARE" >> $CFGINITRD - export OGSERVERLOG="${oglog:-$ROOTSERVER}" && echo "OGSERVERLOG=$OGSERVERLOG" >> $CFGINITRD - export OGSERVERLIVE="${oglive:-$OGSERVERIMAGES}" && echo "OGSERVERLIVE=$OGSERVERLIVE" >> $CFGINITRD - - return 0 -} - - - -# ogUpdateInitrd -#@brief Actualiza el initrd de la cache desde el servidor. Si el arranque ha sido desde cache, comprueba desde el servidor nueva version del initird. -#@param1 -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2011/05/24 -#@version 1.1.0 - Permite varios ogLive dentro de subdirectorios -#@author Irina Gómez. ETSII Universidad de Sevilla -#@date 2017/04/27 -#@version 1.1.0 - Se permite varios ogLives en la CACHE -#@author Antonio J. Doblas Viso. Universidad de Malaga -#@date 2017/05/31 -#*/ ## - -ogUpdateInitrd () -{ - local OGLIVEDIR - OGLIVEDIR=${oglivedir:-"ogclient"} - cd /tmp - mkdir /tmp/cache - TYPE=$(blkid -po export $(blkid -L CACHE) 2>/dev/null | awk -F= '$1=="TYPE" { print $2}') - # Salir si no se detecta caché. - [ -z "$TYPE" ] && return - mount -t $TYPE LABEL=CACHE /tmp/cache || return - mkdir -p /tmp/cache/boot/$OGLIVEDIR - - - # comparamos los del server - busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER - busybox tftp -g -r $OGLIVEDIR/oginitrd.img.sum $ROOTSERVER - SERVERVMLINUZ=`cat ogvmlinuz.sum` - SERVERINITRD=`cat oginitrd.img.sum` - - - #comparamos los de la cache - CACHEVMLINUZ=`cat /tmp/cache/boot/$OGLIVEDIR/ogvmlinuz.sum` - CACHEINITRD=`cat /tmp/cache/boot/$OGLIVEDIR/oginitrd.img.sum` - - echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD" - echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD" - - cd /tmp/cache/boot/$OGLIVEDIR || mkdir -p /tmp/cache/boot/$OGLIVEDIR - - if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ] - then - echo "ogvmlinuz updating" - busybox tftp -g -r $OGLIVEDIR/ogvmlinuz $ROOTSERVER - busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER - DOREBOOT=true - fi - if [ "$CACHEINITRD" != "$SERVERINITRD" ] - then - echo "oginitrd updating" - busybox tftp -g -r $OGLIVEDIR/oginitrd.img $ROOTSERVER - busybox tftp -g -r $OGLIVEDIR/oginitrd.img.sum $ROOTSERVER - DOREBOOT=true - fi - - cd /; umount /tmp/cache - - [ "$DOREBOOT" == "true" ] && reboot -f - -} - -#/** -# ogConnect -#@brief Conecta con los recursos necesarios para opengnsys -#@param1 ip del servidor TODO:dns -#@param2 protocolo -#@param3 punto de acceso remoto -#@param4 punto de montaje local -#@param5 acceso de lectura tipo ",ro" -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2011/05/24 -#*/ ## - -ogConnect () -{ - SERVER=$1 - PROTOCOL=$2 - SRC=$3 - DST=$4 - READONLY=$5 - - case "$PROTOCOL" in - nfs) - nfsmount ${SERVER}:${SRC} ${DST} -o nolock${READONLY} 2> /dev/null || mount.nfs ${SERVER}:${SRC} ${DST} -o nolock${READONLY} - ;; - smb) - mount.cifs //${SERVER}/${SRC} ${DST} ${OPTIONS}${READONLY} - ;; - local) - # Comprobamos que estatus sea online y que la variable del server no esta vacia. - if [ "$ogstatus" != "offline" -a "$SERVER" != "" -a "$SRC" != "" ]; then - # Comprobamos que existe un servicio de samba. - smbclient -L $SERVER -N &>/dev/null - if [ $? -eq 0 ]; then - mount.cifs //${SERVER}/og${SRC} ${DST} ${OPTIONS}${READONLY} - fi - # TODO: buscar condicion para NFS - fi - ;; - *) - return 1 - ;; - esac - return $? -} - - -#/** -# ogConnectOgLive -#@brief Conecta con el recurso para usar el sistema raiz externo, remoto o local -#@param1 -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2011/05/24 -ogConnectOgLive () -{ -# Si ogprotocol=local, la funcion ogExportVar => SRCOGLIVE=local - if [ "$SRCOGLIVE" == "local" ] - then - echo "Montar imagen del sistema root desde dispositivo local" - for i in $(blkid /dev/s* | grep $OGLIVELABEL | awk -F: '{print $2}' | tr -d \"); do export $i; done - # si local usb| cd con partcion es identificada como label $OGLIVELABEL - mount -t $TYPE LABEL=$OGLIVELABEL $DSTOGLIVE - if [ $? != 0 ] - then - # Si local es particion CACHE es identificada como CACHE - mount LABEL=CACHE $DSTOGLIVE - #export LOCALMEDIA=CACHE - fi - else - # Si ogprotocol es remoto. TODO en smb rw y en nfs ro?? - ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE - fi -# Si el montaje ha sido correcto, tanto en local como en remoto. Procedemos con la union - ogMergeLive -} - - -#/** -# ogMergeLive -#@brief Metafuncion para fusionar el initrd con el sistema raiz. -#@param1 -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2011/05/24 -ogMergeLive() -{ -#Si existe en el punto de acceso del del oglive el fichero ogclient.sqfs -if [ ! -d $DSTOGLIVE/$OGLIVEDIR ]; then - echo "Usando ogLive por defecto." - export OGLIVEDIR=$DEFOGLIVE -fi -if [ -f $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs ] -then - cat /proc/mounts > /tmp/mtab.preunion - if [ "$og2nd" == "img" ] - then - #Montamos el ROOTFS tipo img, para desarrolladores - #TODO: comprobar que se tiene acceso de escritura - losetup /dev/loop0 $DSTOGLIVE/$OGLIVEDIR/ogclient.img -o 32256 - mount /dev/loop0 $OGLIVEROOTFS - else - ## Montamos el ROOTFS tipo squashfs - mount $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs $OGLIVEROOTFS -t squashfs -o loop - fi -# Realizamos la union entre el ogliveram(initrd) y el ogliverootfs(ogclient.sqfs) -# Nota: el orden es muy importante para evitar errores de montaje. - [ -d $OGLIVEROOTFS/lib32 ] && LIBS=lib32 - for i in bin sbin lib $LIBS etc var usr root boot; do - ogUnionLiveDir $i - done - [ -L /etc/mtab ] || cat /tmp/mtab.preunion > /etc/mtab -else - echo "Fichero imagen del cliente no encontrado" - return 1 -fi -} - - - -#/** -# ogUnionLiveDir -#@brief fusiona dos directorios con unionfs -#@param1 -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2011/05/24 -ogUnionLiveDir() -{ - TMPDIR=/$1 #dir - FUSE_OPT="-o default_permissions -o allow_other -o use_ino -o nonempty -o suid" - UNION_OPT="-o cow -o noinitgroups" - UBIN="unionfs-fuse" - - mkdir -p $OGLIVERAMFS$TMPDIR - U1STDIR="${OGLIVERAMFS}${TMPDIR}=RW" - U2NDDIR="${OGLIVEROOTFS}${TMPDIR}=RO" - UNIONDIR=${OGLIVEUNIONFS}${TMPDIR} - mkdir -p $UNIONDIR $TMPDIR - $UBIN $FUSE_OPT $UNION_OPT ${U1STDIR}:${U2NDDIR} $UNIONDIR - mount --bind $UNIONDIR $TMPDIR -} - - - -#/** -# ogConfigureLoopback -#@brief Configura la interfaz loopback para cliente torrent -#@param -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 Usando funciones generales de ubuntu -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2010/05/24 -#@version 1.0.1 Deteccion automatica de interfaz con enlace activo. -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2011/05/24 -#*/ ## -ogConfigureLoopback() -{ - # for the portmapper we need localhost - ifconfig lo 127.0.0.1 - #/etc/init.d/portmap start -} - -#/** -# ogConfigureNetworking -#@brief Configura la interfaz de red usada en el pxe -#@param -#@return -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author Antonio J. Doblas. Universidad de Malaga. -#@date 2010/05/24 -#*/ ## -ogConfigureNetworking() -{ -#echo "ogConfigureNetworking: Buscando interfaz a configurar DEVICE" -if [ -n "${BOOTIF}" ] -then - #echo " variable BOOTIF exportada con pxelinux.0 con valor $BOOTIF" - IP=$IPOPTS - temp_mac=${BOOTIF#*-} - # convert to typical mac address format by replacing "-" with ":" - bootif_mac="" - IFS='-' - for x in $temp_mac ; do - if [ -z "$bootif_mac" ]; then - bootif_mac="$x" - else - bootif_mac="$x:$bootif_mac" - fi - done - unset IFS - # look for devices with matching mac address, and set DEVICE to - # appropriate value if match is found. - for device in /sys/class/net/* ; do - if [ -f "$device/address" ]; then - current_mac=$(cat "$device/address") - if [ "$bootif_mac" = "$current_mac" ]; then - DEVICE=${device##*/} - break - fi - fi - done -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 - none|off) - return 0 - ;; - ""|on|any) - # Bring up device - DEVICE=1 - ;; - dhcp|bootp|rarp|both) - DEVICE=1 - ;; - *) - DEVICE=`echo $IP | cut -f6 -d:` - ;; - esac -fi -DEVICE=$(ogGetNetworkDevice $DEVICE) -if [ -z "${DEVICE}" ]; then - echo "variable DEVICE con valor $DEVICE no encontrada, llamamos de nuevo a ogconfigure_networking" - ogConfigureNetworking -fi - -[ -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 /run/net-$DEVICE" -#fi - -# Activamos la interfaz antes de configurar. -ip address flush $DEVICE -ip link set dev $DEVICE up -# Si no se detecta señal portadora volver a configurar. -sleep 1 -CARRIER=$(cat /sys/class/net/${DEVICE}/carrier) -if [ "$CARRIER" != "1" ] -then - ogConfigureNetworking -fi - -# support ip options see linux sources -# Documentation/filesystems/nfsroot.txt -# Documentation/frv/booting.txt -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 /run/net-"${DEVICE}".conf ]; then - break; - fi - case "$IP" in - none|off) - return 0 - ;; - ""|on|any) - # Bring up device - echo "Setting $DEVICE with option:on|any and Variable IP= $IP: ipconfig -t ${ROUNDTTT} ${DEVICE} " - ipconfig -t ${ROUNDTTT} ${DEVICE} - ;; - dhcp|bootp|rarp|both) - echo "Setting $DEVICE with option:dhcp|bootp|rarp|both and Variable IP= $IP: ipconfig -t ${ROUNDTTT} -c ${IP} -d ${DEVICE} " - ipconfig -t ${ROUNDTTT} -c ${IP} -d ${DEVICE} - ;; - *) - echo "Setting $DEVICE with option * and Variable IP= $IP: ipconfig -t ${ROUNDTTT} -d $IP " - ipconfig -t ${ROUNDTTT} -d $IP - # grab device entry from ip option - NEW_DEVICE=${IP#*:*:*:*:*:*} - if [ "${NEW_DEVICE}" != "${IP}" ]; then - NEW_DEVICE=${NEW_DEVICE%:*} - else - # wrong parse, possibly only a partial string - NEW_DEVICE= - fi - if [ -n "${NEW_DEVICE}" ]; then - DEVICE="${NEW_DEVICE}" - fi - ;; - esac -done - -# source ipconfig output -if [ -n "${DEVICE}" ]; then - export DEVICE - export DEVICECFG="/run/net-${DEVICE}.conf" - # En algunos casos, el fichero de configuración está en /tmp. - [ ! -f $DEVICECFG -a -f ${DEVICECFG/run/tmp} ] && mv ${DEVICECFG/run/tmp} $DEVICECFG - source $DEVICECFG - echo "DEVICE=$DEVICE" >> $CFGINITRD - echo "DEVICECFG=$DEVICECFG" >> $CFGINITRD - 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 - source /run/net-*.conf -fi -} - - -#/** -# ogYesNo -#@brief Gestion de peticiones de usuario en modo ogdebug=true -#@param1 OPTIONS --timeout N --default ANSWER -#@param1 Questions -#@return 1=yes 0=no -#@exception OG_ERR_FORMAT Formato incorrecto. -#@version 0.9 -#@author: -#@date 2010/05/24 -#*/ ## -ogYesNo() -{ - local ans - local ok=0 - local timeout=0 - local default - local t - - while [[ "$1" ]] - do - case "$1" in - --default) - shift - default=$1 - if [[ ! "$default" ]]; then error "Missing default value"; fi - t=$(echo $default | tr '[:upper:]' '[:lower:]') - - if [[ "$t" != 'y' && "$t" != 'yes' && "$t" != 'n' && "$t" != 'no' ]]; then - error "Illegal default answer: $default" - fi - default=$t - shift - ;; - - --timeout) - shift - timeout=$1 - if [[ ! "$timeout" ]]; then error "Missing timeout value"; fi - #if [[ ! "$timeout" =~ ^[0-9][0-9]*$ ]]; then error "Illegal timeout value: $timeout"; fi - shift - ;; - - -*) - error "Unrecognized option: $1" - ;; - - *) - break - ;; - esac - done - - if [[ $timeout -ne 0 && ! "$default" ]]; then - error "Non-zero timeout requires a default answer" - fi - - if [[ ! "$*" ]]; then error "Missing question"; fi - - while [[ $ok -eq 0 ]] - do - if [[ $timeout -ne 0 ]]; then - if ! read -t $timeout -p "$*" ans; then - ans=$default - else - # Turn off timeout if answer entered. - timeout=0 - if [[ ! "$ans" ]]; then ans=$default; fi - fi - else - read -p "$*" ans - if [[ ! "$ans" ]]; then - ans=$default - else - ans=$(echo $ans | tr '[:upper:]' '[:lower:]') - fi - fi - - if [[ "$ans" == 'y' || "$ans" == 'yes' || "$ans" == 'n' || "$ans" == 'no' ]]; then - ok=1 - fi - - if [[ $ok -eq 0 ]]; then warning "Valid answers are: yes y no n"; fi - done - [[ "$ans" = "y" || "$ans" == "yes" ]] -} - diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit b/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit deleted file mode 100755 index 2c88fdc8..00000000 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit +++ /dev/null @@ -1,146 +0,0 @@ -# OpenGnsys oginit -*- shell-script -*- - -#@file oginit -#@brief Guion modificador inicio initrd para OpenGnsys -#@warning -#@version 0.1 - basado en ROOTfs - rootfs over nfs - -#@author Antonio J. Doblas Viso. Universidad de Málaga -#@date 2009/00/00 -#@version 0.2 - basado en RAMFS - instalador de ubunto - -#@author Alejandro Castillo, Ramón Gómez, Irina, Antonio Doblas -#@date 2010/00/00 -#@version 0.7 - Hibrido en RAMFS + ROOTFS -mkinitrd, busybox, deboostrap- -#@author Antonio J. Doblas Viso. Universidad de Málaga. EVLT. -#@date 2010/05/24 -#@version 0.8 - Soporte smb, asignación ip estática -#@author Antonio J. Doblas Viso. Universidad de Málaga. EVLT. -#@date 2010/06/24 -#@version 0.8.1 - Integración RAMFS+ROOTFS con UnionFS y squasfs -#@author Antonio J. Doblas Viso. Universidad de Málaga. EVLT. -#@date 2010/06/29 -#@version 1.0. - Adaptacion variables. Corrección enlace red -#@author Antonio J. Doblas Viso. Universidad de Málaga. EVLT. -#@date 2011/06/16 -#@version 1.0.1 - Logica para inicio multiples dispositivos, usb, red, cd -#@author Antonio J. Doblas Viso. Universidad de Málaga. EVLT. -#@date 2011/07/4 -#@version 1.0.2 - RAMFS: instalación y actualización automatica en cache -#@author Antonio J. Doblas Viso. Universidad de Málaga. EVLT. -#@date 2011/08/4 -#@version 1.0.5 - Cambiar resolución de pantalla para Kernel con parámetro "video". -#@author Ramón Gómez, ETSII Universidad de Sevilla -#@date 2013/02/18 -#*/ - - -# Parameter: Where to mount the filesystem -mountroot () -{ - [ -f /scripts/VERSION.txt ] && OGVERSION=$(cat /scripts/VERSION.txt) - OGVERSION=${OGVERSION:-"OpenGnsys Client"} - echo; echo; echo "$OGVERSION"; echo; echo - - #[ "$quiet" != "y" ] && log_begin_msg "Running OpenGnsys /scripts/og-top" - #run_scripts /scripts/og-top - #[ "$quiet" != "y" ] && log_end_msg - - # If the root device hasn't shown up yet, give it a little while - # to deal with removable devices - - . /scripts/functions - . /scripts/ogfunctions - - sleep 2 - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before get OG variables: y/N " - [ $? == 0 ] && sh || echo " " - set -a - log_success_msg "Checking kernel parameters" - ogExportKernelParameters - # Cambiar resolución de vídeo para kernels que usan el parámetro "video". - [ -n "$video" ] && ogChangeVideoResolution - log_success_msg "Checking OpenGnsys Environmnet" - ogExportVarEnvironment - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure ramfs structure for OG: y/N " - [ $? == 0 ] && sh || echo " " - ogConfigureRamfs - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure netmoule specified in kernel parameters: y/N " - [ $? == 0 ] && sh || echo " " - ogLoadNetModule - - #[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/og-premount" - #run_scripts /scripts/og-premount - #[ "$quiet" != "y" ] && log_end_msg - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure networking: y/N " - [ $? == 0 ] && sh || echo " " - if [ -n "$oglive" ] - then - while !(ping -c 1 $oglive &> /dev/null) - do - ogConfigureNetworking - done - fi - log_success_msg "config networking" - ogConfigureLoopback - log_success_msg "config loopback" - - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before detect rootserver: y/N " - [ $? == 0 ] && sh || echo " " - ogGetROOTSERVER && log_success_msg "Get Info from pxe server and ckeck distribuited OG services " - - - if [ "$ogdebug" == "true" -a "$ogupdateinitrd" == "true" ]; then - ogYesNo --timeout 5 --default no "Stop before check updating initrd: y/N " - [ $? == 0 ] && sh || echo " " - fi - # Actualizar Initrd si se solicita o si no se corresponde con su kernel. - if [ "$ogupdateinitrd" == "true" -o ! -d /lib/modules/$(uname -r) ]; then - ogUpdateInitrd - fi - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect and merging the rootfs -ogLive- with $OGSERVERLIVE: y/N " - [ $? == 0 ] && sh || echo " " - ogConnectOgLive && log_success_msg "Merge the initrd with the remote rootfs -ogLive- on $OGSERVERLIVE" || sh - # si es necesario realiza ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir SHARE -engine,scripts,interface, -share- on $OGSERVERSHARE : y/N " - [ $? == 0 ] && sh || echo " " - ogConnect $OGSERVERSHARE $OGPROTOCOL $SRCOGSHARE $DSTOGSHARE - if [ $? -ne 0 -a "$SRCOGSHARE" != "$DEFOGSHARE" ]; then - ogConnect $OGSERVERSHARE $OGPROTOCOL $DEFOGSHARE $DSTOGSHARE && SRCOGSHARE=$DEFOGSHARE - fi - unset DEFOGSHARE - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir LOG STORAGE on $OGSERVERLOG : y/N " - [ $? == 0 ] && sh || echo " " - ogConnect $OGSERVERLOG $OGPROTOCOL $SRCOGLOG $DSTOGLOG - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with REPOSITORY STORAGE on $OGSERVERIMAGES : y/N " - [ $? == 0 ] && sh || echo " " - ogConnect $OGSERVERIMAGES $OGPROTOCOL $SRCOGIMAGES $DSTOGIMAGES ,ro - - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before doing the postconfiguration: y/N " - [ $? == 0 ] && sh || echo " " - ogPostConfigureFS - setupcon -k - - [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before calling oginit with /etc/inittab: y/N " - [ $? == 0 ] && sh || echo " " - -if [ "$oginit" ] -then - exec $oginit -else - exec init -fi - - - - - -} diff --git a/client/boot-tools/includes/etc/inittab b/client/boot-tools/includes/etc/inittab deleted file mode 100644 index 6d3277fc..00000000 --- a/client/boot-tools/includes/etc/inittab +++ /dev/null @@ -1,14 +0,0 @@ -# This is run first except when booting in single-user mode -# -#::sysinit:/opt/opengnsys/etc/preinit/defaultTESTING.sh -# /bin/sh invocations on selected ttys -# -# Start an "askfirst" shell on the console (whatever that may be) -#::askfirst:/bin/sh -# Start an "askfirst" shell on /dev/tty2-4 -#tty1::respawn:/sbin/getty 38400 tty1 -tty1::respawn:/opt/opengnsys/etc/preinit/default.sh -tty2::respawn:/sbin/getty 38400 tty2 -tty3::respawn:/sbin/getty 38400 tty3 -tty4::respawn:/sbin/getty 38400 tty4 -tty5::respawn:/sbin/getty 38400 tty5 diff --git a/client/boot-tools/includes/etc/modprobe.d/blacklist-framebuffer.conf b/client/boot-tools/includes/etc/modprobe.d/blacklist-framebuffer.conf deleted file mode 100644 index 51a9ac64..00000000 --- a/client/boot-tools/includes/etc/modprobe.d/blacklist-framebuffer.conf +++ /dev/null @@ -1,31 +0,0 @@ -# Framebuffer drivers are generally buggy and poorly-supported, and cause -# suspend failures, kernel panics and general mayhem. For this reason we -# never load them automatically. -blacklist aty128fb -blacklist atyfb -#blacklist radeonfb -blacklist cirrusfb -blacklist cyber2000fb -blacklist cyblafb -blacklist gx1fb -blacklist hgafb -blacklist i810fb -blacklist i915_bpo -blacklist intelfb -blacklist kyrofb -blacklist lxfb -blacklist matroxfb_base -blacklist neofb -blacklist nvidiafb -blacklist pm2fb -blacklist radeon -blacklist rivafb -blacklist s1d13xxxfb -blacklist savagefb -blacklist sisfb -blacklist sstfb -blacklist tdfxfb -blacklist tridentfb -blacklist vfb -blacklist viafb -blacklist vt8623fb diff --git a/client/boot-tools/includes/etc/mtab b/client/boot-tools/includes/etc/mtab deleted file mode 100644 index e69de29b..00000000 --- a/client/boot-tools/includes/etc/mtab +++ /dev/null diff --git a/client/boot-tools/includes/etc/network/interfaces b/client/boot-tools/includes/etc/network/interfaces deleted file mode 100644 index dbe43582..00000000 --- a/client/boot-tools/includes/etc/network/interfaces +++ /dev/null @@ -1,4 +0,0 @@ -auto lo -iface lo inet loopback -auto eth0 -iface eth0 inet dhcp
\ No newline at end of file diff --git a/client/boot-tools/includes/etc/profile.d/loadenviron.sh b/client/boot-tools/includes/etc/profile.d/loadenviron.sh deleted file mode 100755 index e2ad0144..00000000 --- a/client/boot-tools/includes/etc/profile.d/loadenviron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -### NOTA este archivo se debe de copiar desde el fichero etc/init/default - diff --git a/client/boot-tools/includes/etc/securetty.template b/client/boot-tools/includes/etc/securetty.template deleted file mode 100644 index 491d8f52..00000000 --- a/client/boot-tools/includes/etc/securetty.template +++ /dev/null @@ -1,142 +0,0 @@ -# /etc/securetty: list of terminals on which root is allowed to login. -# See securetty(5) and login(1). -console - - -pts/0 -pts/1 -pts/2 -pts/3 - - -# Standard serial ports -ttyS0 -ttyS1 -ttyS2 -ttyS3 -ttyS4 -ttyS5 - -# USB dongles -ttyUSB0 -ttyUSB1 -ttyUSB2 - -# PowerMac -ttyPZ0 -ttyPZ1 -ttyPZ2 -ttyPZ3 - -# Embedded MPC platforms -ttyPSC0 -ttyPSC1 -ttyPSC2 -ttyPSC3 -ttyPSC4 -ttyPSC5 - -# PA-RISC mux ports -ttyB0 -ttyB1 - -# Standard hypervisor virtual console -hvc0 - -# Oldstyle Xen console -xvc0 - -# Standard consoles -tty1 -tty2 -tty3 -tty4 -tty5 -tty6 -tty7 -tty8 -tty9 -tty10 -tty11 -tty12 -tty13 -tty14 -tty15 -tty16 -tty17 -tty18 -tty19 -tty20 -tty21 -tty22 -tty23 -tty24 -tty25 -tty26 -tty27 -tty28 -tty29 -tty30 -tty31 -tty32 -tty33 -tty34 -tty35 -tty36 -tty37 -tty38 -tty39 -tty40 -tty41 -tty42 -tty43 -tty44 -tty45 -tty46 -tty47 -tty48 -tty49 -tty50 -tty51 -tty52 -tty53 -tty54 -tty55 -tty56 -tty57 -tty58 -tty59 -tty60 -tty61 -tty62 -tty63 - -# Local X displays (allows empty passwords with pam_unix's nullok_secure) -:0 -:0.0 -:0.1 -:1 -:1.0 -:1.1 -:2 -:2.0 -:2.1 -:3 -:3.0 -:3.1 - -# Embedded Freescale i.MX ports -ttymxc0 -ttymxc1 -ttymxc2 -ttymxc3 -ttymxc4 -ttymxc5 - -# Embedded Renesas SuperH ports -ttySC0 -ttySC1 -ttySC2 -ttySC3 -ttySC4 -ttySC5
\ No newline at end of file diff --git a/client/boot-tools/includes/etc/ssh/ssh_config b/client/boot-tools/includes/etc/ssh/ssh_config deleted file mode 100644 index 7f9319dc..00000000 --- a/client/boot-tools/includes/etc/ssh/ssh_config +++ /dev/null @@ -1,56 +0,0 @@ - -# This is the ssh client system-wide configuration file. See -# ssh_config(5) for more information. This file provides defaults for -# users, and the values can be changed in per-user configuration files -# or on the command line. - -# Configuration data is parsed as follows: -# 1. command line options -# 2. user-specific file -# 3. system-wide file -# Any configuration value is only changed the first time it is set. -# Thus, host-specific definitions should be at the beginning of the -# configuration file, and defaults at the end. - -# Site-wide defaults for some commonly used options. For a comprehensive -# list of available options, their meanings and defaults, please see the -# ssh_config(5) man page. - -Host * -# ForwardAgent no -# ForwardX11 no -# ForwardX11Trusted yes -# RhostsRSAAuthentication no -# RSAAuthentication yes -# PasswordAuthentication yes - HostbasedAuthentication no -# GSSAPIAuthentication no -# GSSAPIDelegateCredentials no -# GSSAPIKeyExchange no -# GSSAPITrustDNS no -# BatchMode no -# CheckHostIP yes -# AddressFamily any -# ConnectTimeout 0 -# StrictHostKeyChecking ask -# IdentityFile ~/.ssh/identity -# IdentityFile ~/.ssh/id_rsa -# IdentityFile ~/.ssh/id_dsa -# Port 22 -# Protocol 2,1 -# Cipher 3des -# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc -# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160 -# EscapeChar ~ -# Tunnel no -# TunnelDevice any:any -# PermitLocalCommand no -# VisualHostKey no - SendEnv LANG LC_* -# HashKnownHosts yes - GSSAPIAuthentication yes - GSSAPIDelegateCredentials no - - StrictHostKeyChecking no - UserKnownHostsFile=/dev/null - diff --git a/client/boot-tools/includes/etc/ssh/sshd_config b/client/boot-tools/includes/etc/ssh/sshd_config deleted file mode 100644 index 80900684..00000000 --- a/client/boot-tools/includes/etc/ssh/sshd_config +++ /dev/null @@ -1,86 +0,0 @@ -# Package generated configuration file -# See the sshd_config(5) manpage for details - -# What ports, IPs and protocols we listen for -Port 22 -# Use these options to restrict which interfaces/protocols sshd will bind to -#ListenAddress :: -#ListenAddress 0.0.0.0 -Protocol 2 -# HostKeys for protocol version 2 -HostKey /etc/ssh/ssh_host_rsa_key -HostKey /etc/ssh/ssh_host_dsa_key -#Privilege Separation is turned on for security -UsePrivilegeSeparation no - -# Lifetime and size of ephemeral version 1 server key -KeyRegenerationInterval 3600 -ServerKeyBits 768 - -# Logging -SyslogFacility AUTH -LogLevel INFO - -# Authentication: -LoginGraceTime 120 -PermitRootLogin yes -StrictModes yes - -RSAAuthentication yes -PubkeyAuthentication yes -#AuthorizedKeysFile %h/.ssh/authorized_keys - -# Don't read the user's ~/.rhosts and ~/.shosts files -IgnoreRhosts yes -# For this to work you will also need host keys in /etc/ssh_known_hosts -RhostsRSAAuthentication no -# similar for protocol version 2 -HostbasedAuthentication no -# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication -#IgnoreUserKnownHosts yes - -# To enable empty passwords, change to yes (NOT RECOMMENDED) -PermitEmptyPasswords no - -# Change to yes to enable challenge-response passwords (beware issues with -# some PAM modules and threads) -ChallengeResponseAuthentication no - -# Change to no to disable tunnelled clear text passwords -#PasswordAuthentication yes - -# Kerberos options -#KerberosAuthentication no -#KerberosGetAFSToken no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -X11Forwarding yes -X11DisplayOffset 10 -PrintMotd no -PrintLastLog yes -TCPKeepAlive yes -#UseLogin no - -#MaxStartups 10:30:60 -#Banner /etc/issue.net - -# Allow client to pass locale environment variables -AcceptEnv LANG LC_* - -Subsystem sftp /usr/lib/openssh/sftp-server - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -UsePAM yes |