summaryrefslogtreecommitdiffstats
path: root/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-12-22 13:38:11 +0000
committerramon <ramongomez@us.es>2011-12-22 13:38:11 +0000
commitc3c7cb3ae6f6600223111a572050f34f2df6fa71 (patch)
tree96fce1db6bf64fee2845d3a48abcbe07d9937562 /client/boot-tools/includes/etc/initramfs-tools/scripts/oginit
parent4caea352de0d0a19d4e0a2e2dd04980dd28e6be0 (diff)
Congelar versión 1.0.2 en tags/opengnsys-1.0.2 (modifica #446).opengnsys-1.0.2
git-svn-id: https://opengnsys.es/svn/tags/opengnsys-1.0.2@2405 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/boot-tools/includes/etc/initramfs-tools/scripts/oginit')
-rwxr-xr-xclient/boot-tools/includes/etc/initramfs-tools/scripts/oginit127
1 files changed, 127 insertions, 0 deletions
diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit b/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit
new file mode 100755
index 00000000..cc179f9f
--- /dev/null
+++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit
@@ -0,0 +1,127 @@
+# 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
+#*/
+
+
+
+
+
+# Parameter: Where to mount the filesystem
+mountroot ()
+{
+ [ "$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
+ log_success_msg "Checking Opengnys 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 " "
+ ogConfigureNetworking
+ 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
+ [ "$ogupdateinitrd" == "true" ] && ogUpdateInitrd
+
+ [ "$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
+
+ [ "$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
+
+
+ [ "$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
+
+
+
+
+
+}