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 9ca2c68 was
bbb8225,
checked in by irina <irinagomez@…>, 8 years ago
|
#768 Script updateBootCache y función ogUpdateInitrd permiten guardar en la cache el kernel y el initrd de ogLive situados en subdirectorios definido en la variable del kernel oglivedir
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5282 a21b9725-9963-47de-94b9-378ad31fedc9
|
-
Property mode set to
100755
|
File size:
1.6 KB
|
Rev | Line | |
---|
[85c477c] | 1 | #!/bin/bash |
---|
[841ce50] | 2 | |
---|
| 3 | #/** |
---|
| 4 | # updateBootCache |
---|
| 5 | #@brief acelerador arranque pxe. incorpora a la cache el initrd y el kernel. |
---|
| 6 | #@param 1 |
---|
| 7 | #@param ejemplo: |
---|
| 8 | #@return |
---|
| 9 | #@exception OG_ERR_FORMAT formato incorrecto. |
---|
| 10 | #@note |
---|
| 11 | #@todo: |
---|
| 12 | #@version 1.0.1 - requiere el gestor de arranque grub2dos |
---|
| 13 | #@author Antonio J. Doblas Viso. Universidad de Malaga. |
---|
| 14 | #@date 2010/07/27 |
---|
[bbb8225] | 15 | #@author Irina Gómez. ETSII Universidad de Sevilla |
---|
| 16 | #@version 1.1.0 - Permite varios ogLive dentro de subdirectorios |
---|
| 17 | #@date 2017/04/27 |
---|
[841ce50] | 18 | #*/ ## |
---|
| 19 | |
---|
[bbb8225] | 20 | OGLIVEDIR=${oglivedir:-"ogclient"} |
---|
| 21 | OGBTFTP="/opt/oglive/tftpboot/$OGLIVEDIR" |
---|
[85c477c] | 22 | ogMountCache || exit 1 |
---|
[4e0b7c0] | 23 | |
---|
[85c477c] | 24 | [ -d $OGCAC/boot ] || mkdir -p $OGCAC/boot |
---|
[4e0b7c0] | 25 | |
---|
| 26 | # comparamos los del server |
---|
| 27 | SERVERVMLINUZ=`cat ${OGBTFTP}/ogvmlinuz.sum` |
---|
| 28 | SERVERINITRD=`cat ${OGBTFTP}/oginitrd.img.sum` |
---|
| 29 | |
---|
| 30 | #comparamos los de la cache |
---|
| 31 | CACHEVMLINUZ=`cat ${OGCAC}/boot/ogvmlinuz.sum` |
---|
[ef5e5c8] | 32 | CACHEINITRD=`cat ${OGCAC}/boot/oginitrd.img.sum` |
---|
[4e0b7c0] | 33 | |
---|
| 34 | echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD" |
---|
| 35 | echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD" |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ] |
---|
| 39 | then |
---|
| 40 | echo "ogvmlinuz updating" |
---|
[07856ba] | 41 | cp ${OGBTFTP}/ogvmlinuz ${OGCAC}/boot/ogvmlinuz |
---|
| 42 | cp ${OGBTFTP}/ogvmlinuz.sum ${OGCAC}/boot/ogvmlinuz.sum |
---|
[4e0b7c0] | 43 | DOREBOOT=true |
---|
| 44 | fi |
---|
| 45 | if [ "$CACHEINITRD" != "$SERVERINITRD" ] |
---|
| 46 | then |
---|
| 47 | echo "oginitrd updating" |
---|
[07856ba] | 48 | cp ${OGBTFTP}/oginitrd.img ${OGCAC}/boot/oginitrd.img |
---|
| 49 | cp ${OGBTFTP}/oginitrd.img.sum ${OGCAC}/boot/oginitrd.img.sum |
---|
[4e0b7c0] | 50 | DOREBOOT=true |
---|
| 51 | fi |
---|
| 52 | |
---|
| 53 | echo $DOREBOOT |
---|
| 54 | # [ "$DOREBOOT" == "true" ] && busybox reboot -f |
---|
| 55 | |
---|
[07856ba] | 56 | #TODO: Comprobar si es necesario |
---|
| 57 | #cp -prv cp ${OGBTFTP}/ ${OGCAC}/boot/ |
---|
| 58 | |
---|
| 59 | #TODO |
---|
| 60 | #/opt/opengnsys/lib/grub4dos/bootlace.com /dev/sda |
---|
| 61 | |
---|
[4e0b7c0] | 62 | |
---|
Note: See
TracBrowser
for help on using the repository browser.