source: client/shared/scripts/deployImage @ b92b4bb

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 b92b4bb was f311787, checked in by adv <adv@…>, 14 years ago

version 1.0.2 httpd-log #421 #422

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

  • Property mode set to 100755
File size: 1.5 KB
Line 
1#!/bin/bash
2
3#/**
4#         deployImage
5#@brief   Actualiza la cache del cliente con una imagen, y la restaura en la partición.
6#@param 1
7#@param ejemplo: 
8#@return 
9#@exception OG_ERR_FORMAT     formato incorrecto.
10#@note   
11#@todo:
12#@version 0.9.1 - integracion EAC
13#@author  Antonio J. Doblas Viso. Universidad de Malaga.
14#@date    2008/03/17
15#@version 0.9.2 - integracion OpenGnsys
16#@author  Antonio J. Doblas Viso. Universidad de Malaga.
17#@date    2010/07/27
18#@version 1.0.2 - Separacion de log
19#@author  Antonio J. Doblas Viso. Universidad de Malaga.
20#@date    2010/08/04
21#*/ ##
22
23TIME1=$SECONDS
24
25OGLOGSESSION="/tmp/session.log"
26OGLOGCOMMAND="/tmp/command.log"
27
28
29PROG="$(basename $0)"
30if [ $# -lt 4 ]; then
31    ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG REPO imagen ndisco nparticion [ UNICAST|MULTICAST|TORRENT ] [opciones protocolo]"
32    exit $?
33fi
34
35#controlar param1 REPO
36echo "[1] Realizando un updateCache REPO $2.img $5 $6" | tee -a $OGLOGSESSION $OGLOGFILE
37updateCache REPO $2.img $5 $6 | tee -a $OGLOGCOMMAND
38RETVAL=$?
39if [ "$RETVAL" != "0" ]
40then
41        echo "[49] Fin del updateCache REPO $2.img $5 $6 con error $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE
42        # RC=15 No hay cache
43        # RC=16 no hay espacio sufiente
44        exit $RETVAL
45       
46else
47        echo "[50] Iniciando un ogRestore CACHE desde deployImage" | tee -a $OGLOGSESSION $OGLOGFILE
48        ogRestoreImage CACHE /$2 $3 $4 &>> $OGLOGCOMMAND
49        RETVAL=$?
50        [ "$RETVAL" == "0" ] && configureOs $3 $4 | tee -a $OGLOGCOMMAND
51        exit $RETVAL
52fi
Note: See TracBrowser for help on using the repository browser.