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

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 b366f7c was 841ce50, checked in by adv <adv@…>, 14 years ago

version 1.0.2 boot-tools #404 #420 id.version instalador

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

  • Property mode set to 100755
File size: 4.7 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
7#@author  Antonio J. Doblas Viso. Universidad de Málaga
8#@date    2009/00/00
9#@version 0.2 - basado en el instalador de ubunto
10#@author  Alejandro Castillo
11#@author  Ramón Gómez
12#@author  Irina
13#@author  Antonio Doblas
14#@date    2010/00/00
15#@version 0.7 - Generación limpia con mkinitrd, busybox
16#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
17#@date    2010/05/24
18#@version 0.8 - Integración con FileSystem externo
19#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
20#@date    2010/06/24
21#@version 0.8.1 - UnionFS + squasfs
22#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
23#@date    2010/06/29
24#@version 1.0. - Adaptacion variables. Corrección enlace red
25#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
26#@date    2011/06/16
27#@version 1.0.1 - Adaptacion inicio multiples dispositivos, usb, red, cd
28#@author  Antonio J. Doblas Viso. Universidad de Málaga. EVLT.
29#@date    2011/07/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        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect and merging the rootfs -ogLive- : y/N "
84    [ $? == 0 ] && sh || echo " "
85        ogConnectOgLive && log_success_msg "Merge the initrd with the remote rootfs -ogLive-" || sh
86    # si es necesario realiza ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
87
88        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir SHARE -engine,scripts,interface, -share- : y/N "
89    [ $? == 0 ] && sh || echo " "
90        ogConnect $OGSERVERSHARE $OGPROTOCOL $SRCOGSHARE $DSTOGSHARE
91       
92        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir LOG STORAGE : y/N "
93    [ $? == 0 ] && sh || echo " "
94        ogConnect $OGSERVERLOG $OGPROTOCOL $SRCOGLOG $DSTOGLOG
95       
96        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with REPOSITORY STORAGE : y/N "
97    [ $? == 0 ] && sh || echo " "
98        ogConnect $OGSERVERIMAGES $OGPROTOCOL $SRCOGIMAGES $DSTOGIMAGES
99         
100   
101
102        #[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before conect with og Services : y/N "
103    #[ $? == 0 ] && sh || echo " "
104        #ogConectROOTSERVER && log_success_msg "Conecting with og services" || sh
105   
106
107        #[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before merge the Second File System with initrd (First File System) : y/N "
108    #[ $? == 0 ] && sh || echo " "
109        #ogMerge2ndFile && log_success_msg "Merge onto Second File System"
110
111
112        ####[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/og-bottom"
113        ####run_scripts /scripts/og-bottom
114        ####[ "$quiet" != "y" ] && log_end_msg
115
116
117        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before doing the postconfiguration: y/N "
118    [ $? == 0 ] && sh || echo " "
119        ogPostConfigureFS
120        setupcon -k
121
122        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before calling oginit with /etc/inittab: y/N "
123    [ $? == 0 ] && sh || echo " "
124   
125if [ "$oginit" ]
126then
127        exec $oginit
128else
129        exec init
130fi
131
132
133
134
135
136}
Note: See TracBrowser for help on using the repository browser.