1 | |
---|
2 | function BuildOSBase() { |
---|
3 | #/** @function BuildOSBase: @brief instala los componentes base de los opengnsys OS y muestra aquellos que hay que compilar. |
---|
4 | #@param $1 str_versionLinux |
---|
5 | #@param ejemplo BuildEACOSBase ubuntu904 |
---|
6 | #@return |
---|
7 | #@warning Salidas de errores no determinada |
---|
8 | #@attention |
---|
9 | #@version 0.1 Date: 02/05/2009 Author Antonio J. Doblas Viso. Universidad de Malaga |
---|
10 | #@note version importada desde EAC para su adaptación a opengnsys. No testeada |
---|
11 | #*/ |
---|
12 | # |
---|
13 | if [ $# = 0 ] |
---|
14 | then |
---|
15 | echo"InstallEACOSBase instala los componentes base de los EAC OS." |
---|
16 | echo "sintaxis: InstallEACOSBASE strVersionLinux --- Ejemplo: InstallEACOSBase ubuntu0904 " |
---|
17 | return |
---|
18 | fi |
---|
19 | if [ $# = 1 ] |
---|
20 | then |
---|
21 | case $1 in |
---|
22 | "ubuntu0904") |
---|
23 | cp -ra /etc/udev/rules.d /etc/udev/rules.d-old |
---|
24 | rm /etc/udev/rules.d/70-persistent-net.rules |
---|
25 | echo "###########START Especificos EAC############ " >> /etc/apt/sources.list |
---|
26 | echo "deb http://free.nchc.org.tw/ubuntu jaunty-security main restricted universe multiverse" >> /etc/apt/sources.list |
---|
27 | echo "deb http://free.nchc.org.tw/drbl-core drbl stable" >> /etc/apt/sources.list |
---|
28 | echo "deb http://www.geekconnection.org/remastersys/repository ubuntu/" >> /etc/apt/sources.list |
---|
29 | echo "###########END Especificos EAC############ " >> /etc/apt/sources.list |
---|
30 | apt-get update |
---|
31 | #apt-get install xorg-dev xorg lxde qingy roxterm |
---|
32 | #apt-get install firefox links midbrowser scite |
---|
33 | #apt-get install build-essential cmake m4 autoconf gettext libbz2-dev |
---|
34 | apt-get install nfs-common nfs-kernel-server openssh-server sshfs |
---|
35 | apt-get install reiser4progs hfsplus curl |
---|
36 | apt-get install fusesmb smbnetfs smbfs subversion |
---|
37 | apt-get install gkrellm saidar htop iptraf vnstat ethstatus darkstat ncdu xdiskusage iotop lshw lshw-gtk conky |
---|
38 | apt-get install dcfldd ddrescue di disktype dmraid hdparm sdparm hexedit lftp lsscsi lshw mc myrescue testdisk hwinfo |
---|
39 | apt-get install partimage ntfsprogs partclone mysql-client php5 php5-cli php5-cgi php5-mysql registry-tools sysv-rc-conf kexec-tools gparted parted parted-doc gnu-fdisk fatresize gparted |
---|
40 | apt-get install lzop ethtool etherwake remastersys bfr fbgrab fbset ksh registry-tools netpipes |
---|
41 | apt-get install drbl-partimage drbl-chntpw drbl-ntfsprogs drbl-lzop |
---|
42 | # desactivamos por si acaso alguno servicios, que en la distribucion base no son necesarios |
---|
43 | #/etc/init.d/apache2 stop && update-rc.d -f apache2 remove |
---|
44 | #update-rc.d -f gdm remove |
---|
45 | #apt-get install lighttpd |
---|
46 | #/etc/init.d/lighttpd stop && update-rc.d -f lighttpd remove |
---|
47 | ;; |
---|
48 | esac |
---|
49 | fi |
---|
50 | |
---|
51 | if [ $# = 1 ] |
---|
52 | then |
---|
53 | |
---|
54 | echo "creando la estrucutra de datos" |
---|
55 | mkdir -p /opt/opengnsys/{bin,etc,log,lib/{engine/bin,modules},images,init} |
---|
56 | cd /root/ && svn co svn://www.informatica.us.es:3690/eac-hidra |
---|
57 | fi |
---|
58 | |
---|
59 | |
---|
60 | if [ $# = 1 ] |
---|
61 | then |
---|
62 | read -p "pausa para configurar el framebuffer: abre una nueva consola y segue estas intrucciones, luego pulsa enter" |
---|
63 | echo "Activar el framebuffer: abre una consola y realiza estas operaciones" |
---|
64 | echo "/etc/modprobe.d/blacklist-framebuffer => le comentamos las lineas de vesafb, vga16fb y radeonfb" |
---|
65 | echo "/etc/initramfs-tools/modules => agregamos en una linea cada una de estas fbcon vesafb vga16b" |
---|
66 | echo "actualizamos con # update-initramfs -u" |
---|
67 | echo "acivadmos el framebuffer en /boot/grub/menu.lst y en el kernel que deseemos a�adimos vga=791" |
---|
68 | fi |
---|
69 | |
---|
70 | if [ $# = 1 ] |
---|
71 | then |
---|
72 | read -p "pausa para configurar el framebuffer: abre una nueva consola y segue estas intrucciones, luego pulsa enter" |
---|
73 | echo "configurar el lighttd" |
---|
74 | read -p "press enter" |
---|
75 | fi |
---|
76 | |
---|
77 | if [ $# = 1 ] |
---|
78 | then |
---|
79 | importclient=/opt/opengnsys |
---|
80 | echo "configurar el /etc/bash.bashrc" |
---|
81 | echo "####### EAC ##########" >> /etc/bash.bashrc |
---|
82 | echo "importclient=/opt/opengnsys" >> /etc/bash.bashrc |
---|
83 | echo "export PATH=$PATH:/sbin/:/bin/:/opt/:/usr/local/sbin/:/usr/local/bin/:/usr/bin/:/usr/sbin/:/opt/opengnsys/" >> /etc/bash.bashrc |
---|
84 | echo source ${importclient}/lib/engine/Settings.lib >> /etc/bash.bashrc |
---|
85 | echo source ${importclient}/lib/engine/ATA.lib >> /etc/bash.bashrc |
---|
86 | echo source ${importclient}/lib/engine/Boot.lib >> /etc/bash.bashrc |
---|
87 | echo source ${importclient}/lib/engine/Deploy.lib >> /etc/bash.bashrc |
---|
88 | echo source ${importclient}/lib/engine/FileSystem.lib >> /etc/bash.bashrc |
---|
89 | echo source ${importclient}/lib/engine/PostConf.lib >> /etc/bash.bashrc |
---|
90 | fi |
---|
91 | |
---|
92 | if [ $# = 1 ] |
---|
93 | then |
---|
94 | read -p "pausa para compilar los programas necesarios: abre una nueva consola y segue estas intrucciones, luego pulsa enter" |
---|
95 | echo "estos hay que compilarlos estan dentro de source" |
---|
96 | echo "partition saving http://partition-saving.com" |
---|
97 | echo "mbuffer (http://www.maier-komor.de/mbuffer.html) requiere ksh" |
---|
98 | echo "udp-cast 2008-09-14 http://udpcast.linux.lu/" |
---|
99 | echo "ctorrent 3.3.2 http://www.rahul.net/dholmes/ctorrent/" |
---|
100 | echo "wmi-client: https://launchpad.net/ubuntu/jaunty/+source/wmi/1:0.1.12-1" |
---|
101 | echo "ms-sys http://ms-sys.sourceforge.net/" |
---|
102 | echo "EACInterfaces copiar el binario a /usr/sbin" |
---|
103 | echo NameCompany copiar a /usr/sbin" |
---|
104 | echo NameNtpServer a /usr/sbin" |
---|
105 | fi |
---|
106 | } |
---|
107 | |
---|
108 | |
---|
109 | function BuildOgClientNfs () { |
---|
110 | #/** @function BuildOgClientNfs: @brief Genera una copia del sistema actual para convertirlo posteriormente en arranque pxe EAC. |
---|
111 | #@param $1 str_DirectorioDestino |
---|
112 | #@param $2 str_metodo (debootstrap o myfilsystem) |
---|
113 | #@param ejemplo: BuildOgClientNfs /opt/opengnsys/tftpboot/ogClinent/ogClientNfs debootstrap |
---|
114 | #@return: no definida |
---|
115 | #@warning No controla que el el directorio destino debe estar montado en una particion distinta al sistema raiz. |
---|
116 | #@attention |
---|
117 | #@version 0.1 Date: 03/06/2009 Author Antonio J. Doblas Viso. Universidad de Malaga |
---|
118 | #@note falta la creacion del kernel y el initrd |
---|
119 | #*/ |
---|
120 | if [ $# = 0 ] |
---|
121 | then |
---|
122 | echo"BuildOgClientNfs" |
---|
123 | echo "sintaxis: BuildOfClientNfs str_path_contenedor str_metodo" |
---|
124 | return |
---|
125 | fi |
---|
126 | if [ $# = 2 ] |
---|
127 | then |
---|
128 | if [ $2 = "myfilesystem" ] |
---|
129 | then |
---|
130 | cd / |
---|
131 | cp -rav /. $1/. |
---|
132 | cp -rav -/dev/. $1/dev/. |
---|
133 | fi |
---|
134 | if [ $2 = "debootstrap" ] |
---|
135 | then |
---|
136 | echo "debo" |
---|
137 | fi |
---|
138 | fi |
---|
139 | } |
---|