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

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 504bdd0 was 00a2c2c, checked in by adv <adv@…>, 14 years ago

version 1.0.2 boot-tools #404 #420

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

  • Property mode set to 100755
File size: 4.5 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#*/
28
29
30
31
32
33# Parameter: Where to mount the filesystem
34mountroot ()
35{
36        [ "$quiet" != "y" ] && log_begin_msg "Running OpenGnsys /scripts/og-top"
37        run_scripts /scripts/og-top
38        [ "$quiet" != "y" ] && log_end_msg
39
40        # If the root device hasn't shown up yet, give it a little while
41        # to deal with removable devices
42
43        . /scripts/functions
44        . /scripts/ogfunctions
45
46        sleep 2
47
48        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before get OG variables: y/N "
49    [ $? == 0 ] && sh || echo " "
50        set -a
51        log_success_msg "Checking kernel parameters"
52        ogExportKernelParameters
53        log_success_msg "Checking Opengnys Environmnet"
54        ogExportVarEnvironment
55       
56        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure ramfs structure for OG: y/N "
57    [ $? == 0 ] && sh || echo " "
58        ogConfigureRamfs
59
60        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure netmoule specified in kernel parameters: y/N "
61    [ $? == 0 ] && sh || echo " "
62        ogLoadNetModule
63
64        #[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/og-premount"
65        #run_scripts /scripts/og-premount
66        #[ "$quiet" != "y" ] && log_end_msg
67
68        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure networking: y/N "
69    [ $? == 0 ] && sh || echo " "
70        ogConfigureNetworking
71        log_success_msg "config networking"
72        ogConfigureLoopback
73        log_success_msg "config loopback"
74
75
76        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before detect rootserver: y/N "
77    [ $? == 0 ] && sh || echo " "
78        ogGetROOTSERVER && log_success_msg "Get Info from pxe server and ckeck distribuited OG services "
79
80        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect and merging the rootfs -ogLive- : y/N "
81    [ $? == 0 ] && sh || echo " "
82        ogConnectOgLive && log_success_msg "Merge the initrd with the remote rootfs -ogLive-" || sh
83    # si es necesario realiza ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
84
85        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir SHARE -engine,scripts,interface, -share- : y/N "
86    [ $? == 0 ] && sh || echo " "
87        ogConnect $OGSERVERSHARE $OGPROTOCOL $SRCOGSHARE $DSTOGSHARE
88       
89        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir LOG STORAGE : y/N "
90    [ $? == 0 ] && sh || echo " "
91        ogConnect $OGSERVERLOG $OGPROTOCOL $SRCOGLOG $DSTOGLOG
92       
93        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with REPOSITORY STORAGE : y/N "
94    [ $? == 0 ] && sh || echo " "
95        ogConnect $OGSERVERIMAGES $OGPROTOCOL $SRCOGIMAGES $DSTOGIMAGES
96         
97   
98
99        #[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before conect with og Services : y/N "
100    #[ $? == 0 ] && sh || echo " "
101        #ogConectROOTSERVER && log_success_msg "Conecting with og services" || sh
102   
103
104        #[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before merge the Second File System with initrd (First File System) : y/N "
105    #[ $? == 0 ] && sh || echo " "
106        #ogMerge2ndFile && log_success_msg "Merge onto Second File System"
107
108
109        ####[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/og-bottom"
110        ####run_scripts /scripts/og-bottom
111        ####[ "$quiet" != "y" ] && log_end_msg
112
113
114        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before doing the postconfiguration: y/N "
115    [ $? == 0 ] && sh || echo " "
116        ogPostConfigureFS
117        setupcon -k
118
119        [ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before calling oginit with /etc/inittab: y/N "
120    [ $? == 0 ] && sh || echo " "
121   
122if [ "$oginit" ]
123then
124        exec $oginit
125else
126        exec init
127fi
128
129
130
131
132
133}
Note: See TracBrowser for help on using the repository browser.