summaryrefslogtreecommitdiffstats
path: root/client/shared/scripts/deployImage
blob: 16a403cc3c2d08b87353a1e6404a2d9d274bd3da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

TIME1=$SECONDS
PROG="$(basename $0)"
if [ $# -lt 4 ]; then
    ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG REPO imagen ndisco nparticion [ UNICAST|MULTICAST|TORRENT ] [opciones protocolo]"
    exit $?
fi

#controlar param1 REPO
echo "Realizando un updateCache REPO $2.img $5 $6"
updateCache REPO $2.img $5 $6
RETVAL=$?
if [ "$RETVAL" != "0" ]
then
	echo "fin del updateCache REPO $2.img $5 $6 con error $RETVAL"
	# RC=15 No hay cache
	# RC=16 no hay espacio sufiente
	exit $RETVAL
	
else
	echo "iniciando un ogRestore CACHE desde deployImage"
	ogRestoreImage CACHE /$2 $3 $4 
	RETVAL=$?
	[ "$RETVAL" == "0" ] && configureOs $3 $4
	exit $RETVAL 
fi