source: client/boot-tools/includes/etc/initramfs-tools/scripts/oginit @ d9905b9

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since d9905b9 was 82ae131, checked in by adv <adv@…>, 14 years ago

version 1.0.2 boot-tools #404 #420 #393 #429 #430 #431 #423

git-svn-id: https://opengnsys.es/svn/branches/version1.0@2268 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 4.6 KB
Line 
1# OpenGnsys oginit                      -*- shell-script -*-
2
3#@file    oginit
4#@brief   Guion modificador inicio initrd para OpenGnSys
5#@warning
6#@version 0.1 - basado en ROOTfs - rootfs over nfs -
7#@author  Antonio J. Doblas Viso. Universidad de Málaga
8#@date    2009/00/00
9#@version 0.2 - basado en RAMFS - instalador de ubunto -
10#@author  Alejandro Castillo, Ramón Gómez, Irina, Antonio Doblas
11#@date    2010/00/00
12#@version 0.7 - Hibrido en RAMFS + ROOTFS -mkinitrd, busybox, deboostrap-
13#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
14#@date    2010/05/24
15#@version 0.8 - Soporte smb, asignación ip estática
16#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
17#@date    2010/06/24
18#@version 0.8.1 - Integración RAMFS+ROOTFS con UnionFS y squasfs
19#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
20#@date    2010/06/29
21#@version 1.0. - Adaptacion variables. Corrección enlace red
22#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
23#@date    2011/06/16
24#@version 1.0.1 - Logica para inicio multiples dispositivos, usb, red, cd
25#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
26#@date    2011/07/4
27#@version 1.0.2 - RAMFS: instalación y actualización automatica en cache
28#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
29#@date    2011/08/4
30#*/
31
32
33
34
35
36# Parameter: Where to mount the filesystem
37mountroot ()
38{
39        [ "$quiet" != "y" ] && log_begin_msg "Running OpenGnsys /scripts/og-top"
40        run_scripts /scripts/og-top
41        [ "$quiet" != "y" ] && log_end_msg
42
43        # If the root device hasn't shown up yet, give it a little while
44        # to deal with removable devices
45
46        . /scripts/functions
47        . /scripts/ogfunctions
48
49        sleep 2
50
51        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before get OG variables: y/N "
52    [ $? == 0 ] && sh || echo " "
53        set -a
54        log_success_msg "Checking kernel parameters"
55        ogExportKernelParameters
56        log_success_msg "Checking Opengnys Environmnet"
57        ogExportVarEnvironment
58       
59        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure ramfs structure for OG: y/N "
60    [ $? == 0 ] && sh || echo " "
61        ogConfigureRamfs
62
63        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure netmoule specified in kernel parameters: y/N "
64    [ $? == 0 ] && sh || echo " "
65        ogLoadNetModule
66
67        #[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/og-premount"
68        #run_scripts /scripts/og-premount
69        #[ "$quiet" != "y" ] && log_end_msg
70
71        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure networking: y/N "
72    [ $? == 0 ] && sh || echo " "
73        ogConfigureNetworking
74        log_success_msg "config networking"
75        ogConfigureLoopback
76        log_success_msg "config loopback"
77
78
79        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before detect rootserver: y/N "
80    [ $? == 0 ] && sh || echo " "
81        ogGetROOTSERVER && log_success_msg "Get Info from pxe server and ckeck distribuited OG services "
82
83
84        if [ "$ogdebug" == "true" -a "$ogupdateinitrd" == "true" ]; then
85                ogYesNo --timeout 5 --default no "Stop before check updating initrd: y/N "
86        [ $? == 0 ] && sh || echo " "           
87        fi
88        [ "$ogupdateinitrd" == "true" ] && ogUpdateInitrd 
89
90        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect and merging the rootfs -ogLive- with $OGSERVERLIVE: y/N "
91    [ $? == 0 ] && sh || echo " "
92        ogConnectOgLive && log_success_msg "Merge the initrd with the remote rootfs -ogLive- on $OGSERVERLIVE" || sh
93    # si es necesario realiza ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
94
95        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir SHARE -engine,scripts,interface, -share- on $OGSERVERSHARE : y/N "
96    [ $? == 0 ] && sh || echo " "
97        ogConnect $OGSERVERSHARE $OGPROTOCOL $SRCOGSHARE $DSTOGSHARE
98       
99        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir LOG STORAGE on $OGSERVERLOG : y/N "
100    [ $? == 0 ] && sh || echo " "
101        ogConnect $OGSERVERLOG $OGPROTOCOL $SRCOGLOG $DSTOGLOG
102       
103        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with REPOSITORY STORAGE on $OGSERVERIMAGES : y/N "
104    [ $? == 0 ] && sh || echo " "
105        ogConnect $OGSERVERIMAGES $OGPROTOCOL $SRCOGIMAGES $DSTOGIMAGES
106         
107
108        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before doing the postconfiguration: y/N "
109    [ $? == 0 ] && sh || echo " "
110        ogPostConfigureFS
111        setupcon -k
112
113        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before calling oginit with /etc/inittab: y/N "
114    [ $? == 0 ] && sh || echo " "
115   
116if [ "$oginit" ]
117then
118        exec $oginit
119else
120        exec init
121fi
122
123
124
125
126
127}
Note: See TracBrowser for help on using the repository browser.