diff options
author | ramon <ramongomez@us.es> | 2011-12-22 13:38:11 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2011-12-22 13:38:11 +0000 |
commit | c3c7cb3ae6f6600223111a572050f34f2df6fa71 (patch) | |
tree | 96fce1db6bf64fee2845d3a48abcbe07d9937562 /client/shared/scripts/updateBootCache | |
parent | 4caea352de0d0a19d4e0a2e2dd04980dd28e6be0 (diff) |
Congelar versiĆ³n 1.0.2 en tags/opengnsys-1.0.2 (modifica #446).opengnsys-1.0.2
git-svn-id: https://opengnsys.es/svn/tags/opengnsys-1.0.2@2405 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/scripts/updateBootCache')
-rwxr-xr-x | client/shared/scripts/updateBootCache | 55 |
1 files changed, 51 insertions, 4 deletions
diff --git a/client/shared/scripts/updateBootCache b/client/shared/scripts/updateBootCache index af2267a2..f3edae7c 100755 --- a/client/shared/scripts/updateBootCache +++ b/client/shared/scripts/updateBootCache @@ -1,7 +1,54 @@ #!/bin/bash -OGBTFTP="/opt/og2fs/tftpboot/ogclient/" + +#/** +# updateBootCache +#@brief acelerador arranque pxe. incorpora a la cache el initrd y el kernel. +#@param 1 +#@param ejemplo: +#@return +#@exception OG_ERR_FORMAT formato incorrecto. +#@note +#@todo: +#@version 1.0.1 - requiere el gestor de arranque grub2dos +#@author Antonio J. Doblas Viso. Universidad de Malaga. +#@date 2010/07/27 +#*/ ## + + + +OGBTFTP="/opt/oglive/tftpboot/ogclient" ogMountCache || exit 1 -echo $OGCAC + [ -d $OGCAC/boot ] || mkdir -p $OGCAC/boot -[ -f ${OGCAC}/boot/ogvmlinuz ] || cp ${OGBTFTP}ogvmlinuz ${OGCAC}/boot/ogvmlinuz -[ -f ${OGCAC}/boot/oginitrd.img ] || cp ${OGBTFTP}oginitrd.img ${OGCAC}/boot/oginitrd.img
\ No newline at end of file + + # comparamos los del server + SERVERVMLINUZ=`cat ${OGBTFTP}/ogvmlinuz.sum` + SERVERINITRD=`cat ${OGBTFTP}/oginitrd.img.sum` + + #comparamos los de la cache + CACHEVMLINUZ=`cat ${OGCAC}/boot/ogvmlinuz.sum` + CACHEINITRD=`cat ${OGCAC}/cache/boot/oginitrd.img.sum` + + echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD" + echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD" + + + if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ] + then + echo "ogvmlinuz updating" + cp ${OGBTFTP}ogvmlinuz ${OGCAC}/boot/ogvmlinuz + cp ${OGBTFTP}ogvmlinuz.sum ${OGCAC}/boot/ogvmlinuz.sum + DOREBOOT=true + fi + if [ "$CACHEINITRD" != "$SERVERINITRD" ] + then + echo "oginitrd updating" + cp ${OGBTFTP}oginitrd.img ${OGCAC}/boot/oginitrd.img + cp ${OGBTFTP}oginitrd.img.sum ${OGCAC}/boot/oginitrd.img.sum + DOREBOOT=true + fi + +echo $DOREBOOT +# [ "$DOREBOOT" == "true" ] && busybox reboot -f + + |