summaryrefslogtreecommitdiffstats
path: root/client/shared/scripts/deployImage
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2014-03-13 13:44:51 +0000
committeririna <irinagomez@us.es>2014-03-13 13:44:51 +0000
commit64cf3d33de3b9f7b1cb8092a2f9fc8d20acd39bb (patch)
tree6c4195e1ce91fdea1d6c1b3ca8ef8729558e39f3 /client/shared/scripts/deployImage
parenta1039c0c43c90e1c0f47a5ba436496da648d6e4e (diff)
#640 algunos script adaptados al nuevo formato de la funcion {{{ogRaiseError}}}
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4184 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/scripts/deployImage')
-rwxr-xr-xclient/shared/scripts/deployImage14
1 files changed, 7 insertions, 7 deletions
diff --git a/client/shared/scripts/deployImage b/client/shared/scripts/deployImage
index ec108e1f..08134cc2 100755
--- a/client/shared/scripts/deployImage
+++ b/client/shared/scripts/deployImage
@@ -40,7 +40,7 @@
PROG="$(basename $0)"
if [ $# -lt 4 ]; then
- ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG REPO imagen ndisco nparticion [ UNICAST|UNICAST-CACHE|MULTICAST|MULTICAST-CACHE|TORRENT [opciones protocolo] ]"
+ ogRaiseError session $OG_ERR_FORMAT "$MSG_FORMAT: $PROG REPO imagen ndisco nparticion [ UNICAST|UNICAST-CACHE|MULTICAST|MULTICAST-CACHE|TORRENT [opciones protocolo] ]"
exit $?
fi
@@ -68,9 +68,9 @@ echo " " > $OGLOGCOMMAND
ogEcho log session "[1] $MSG_SCRIPTS_START $0 $*"
# Si el origen(pariticion) esta bloqueada salir.
-ogIsLocked $DISK $PART && exit $(ogRaiseError $OG_ERR_LOCKED "$MSG_PARTITION, $DISK $PART"; echo $?)
+ogIsLocked $DISK $PART && exit $(ogRaiseError session $OG_ERR_LOCKED "$MSG_PARTITION, $DISK $PART"; echo $?)
-ogEcho log session "Desmontando $DISK $PART"
+ogEcho log session "$MSG_HELP_ogUnmount $DISK $PART"
ogUnmount $DISK $PART 2>/dev/null
# Valor por defecto para el repositorio.
@@ -78,7 +78,7 @@ ogUnmount $DISK $PART 2>/dev/null
[ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE"
#Informacioin previa de la imagen
-IMGOS=$(ogGetImageInfo `ogGetPath $REPO $IMGNAME.img`) || exit $(ogRaiseError $OG_ERR_NOTFOUND "$REPO $3"; echo $?)
+IMGOS=$(ogGetImageInfo `ogGetPath $REPO $IMGNAME.img`) || exit $(ogRaiseError session $OG_ERR_NOTFOUND "$REPO $2"; echo $?)
IMGSIZE=$(ls -s `ogGetPath $REPO $IMGNAME.img`| cut -f1 -d" ")
ogEcho log session "[1] REPO=$REPO IMG-FILE=$IMGNAME.img SIZE=$IMGSIZE (KB) METADATA=$IMGOS"
@@ -126,13 +126,13 @@ case "$REPO" in
esac
;;
*) # Error: protocolo desconocido.
- ogRaiseError $OG_ERR_FORMAT "$MSG_ERR_FORMAT, $PROTO"
+ ogRaiseError session $OG_ERR_FORMAT "$MSG_ERR_FORMAT, $PROTO"
exit $?
;;
esac
;;
*) # Error: repositorio desconocido.
- ogRaiseError $OG_ERR_FORMAT "$MSG_ERR_FORMAT, $REPO"
+ ogRaiseError session $OG_ERR_FORMAT "$MSG_ERR_FORMAT, $REPO"
exit $?
;;
esac
@@ -160,7 +160,7 @@ RESUMERESTOREIMAGE=$(grep -m 1 "Total Time:" $OGLOGCOMMAND)
ogEcho log session " [ ] $RESUMERESTOREIMAGE " | tee -a $OGLOGSESSION $OGLOGFILE
# Si la transferencia ha dado error me salgo.
if [ $RETVAL -ne 0 ] ; then
- ogRaiseError $OG_ERR_IMAGE "$REPO $IMGNAME" 2>&1
+ ogRaiseError session $OG_ERR_IMAGE "$REPO $IMGNAME" 2>&1
# Muestro registro de fin de ejecuciĆ³n si no viene de Ejecutar Script
[ "$(ogGetCaller)" == "EjecutarScript" ] || ogEcho log session "$MSG_INTERFACE_END $OG_ERR_IMAGE"
exit $OG_ERR_IMAGE