close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
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
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 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 |
|---|
| 15 | #*/ ## |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | OGBTFTP="/opt/oglive/tftpboot/ogclient" |
|---|
| 20 | ogMountCache || exit 1 |
|---|
| 21 | |
|---|
| 22 | [ -d $OGCAC/boot ] || mkdir -p $OGCAC/boot |
|---|
| 23 | |
|---|
| 24 | # comparamos los del server |
|---|
| 25 | SERVERVMLINUZ=`cat ${OGBTFTP}/ogvmlinuz.sum` |
|---|
| 26 | SERVERINITRD=`cat ${OGBTFTP}/oginitrd.img.sum` |
|---|
| 27 | |
|---|
| 28 | #comparamos los de la cache |
|---|
| 29 | CACHEVMLINUZ=`cat ${OGCAC}/boot/ogvmlinuz.sum` |
|---|
| 30 | CACHEINITRD=`cat ${OGCAC}/boot/oginitrd.img.sum` |
|---|
| 31 | |
|---|
| 32 | echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD" |
|---|
| 33 | echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD" |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ] |
|---|
| 37 | then |
|---|
| 38 | echo "ogvmlinuz updating" |
|---|
| 39 | cp ${OGBTFTP}/ogvmlinuz ${OGCAC}/boot/ogvmlinuz |
|---|
| 40 | cp ${OGBTFTP}/ogvmlinuz.sum ${OGCAC}/boot/ogvmlinuz.sum |
|---|
| 41 | DOREBOOT=true |
|---|
| 42 | fi |
|---|
| 43 | if [ "$CACHEINITRD" != "$SERVERINITRD" ] |
|---|
| 44 | then |
|---|
| 45 | echo "oginitrd updating" |
|---|
| 46 | cp ${OGBTFTP}/oginitrd.img ${OGCAC}/boot/oginitrd.img |
|---|
| 47 | cp ${OGBTFTP}/oginitrd.img.sum ${OGCAC}/boot/oginitrd.img.sum |
|---|
| 48 | DOREBOOT=true |
|---|
| 49 | fi |
|---|
| 50 | |
|---|
| 51 | echo $DOREBOOT |
|---|
| 52 | # [ "$DOREBOOT" == "true" ] && busybox reboot -f |
|---|
| 53 | |
|---|
| 54 | #TODO: Comprobar si es necesario |
|---|
| 55 | #cp -prv cp ${OGBTFTP}/ ${OGCAC}/boot/ |
|---|
| 56 | |
|---|
| 57 | #TODO |
|---|
| 58 | #/opt/opengnsys/lib/grub4dos/bootlace.com /dev/sda |
|---|
| 59 | |
|---|
| 60 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.