summaryrefslogtreecommitdiffstats
path: root/client/shared/scripts/restoreImage
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2015-12-15 10:17:59 +0000
committeririna <irinagomez@us.es>2015-12-15 10:17:59 +0000
commitdc157aebd8235ffac8fa7075d33bc143ef489714 (patch)
treeed77eb706bd599f27923bb14a158dc0e083e0615 /client/shared/scripts/restoreImage
parent79a417549b502d8383e1fa66702077d374df570e (diff)
#678 Unidades organizativas separadas: script de restauraciĆ³n
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4755 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/scripts/restoreImage')
-rwxr-xr-xclient/shared/scripts/restoreImage7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/shared/scripts/restoreImage b/client/shared/scripts/restoreImage
index f0bda76a..0f5317df 100755
--- a/client/shared/scripts/restoreImage
+++ b/client/shared/scripts/restoreImage
@@ -45,13 +45,16 @@ PROTO=${PROTO:-"UNICAST"}
PROTOOPT="$6"
IMGTYPE="${IMGTYPE:-"img"}"
+# Unidad organizativa
+[ "$ogunit" != "" ] && OGUNIT="$ogunit/"
+
# Si es una ip y es igual a la del equipo restaura desde cache
[ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE"
# Si es una ip y es distinta a la del recurso samba cambiamos de REPO.
ogCheckIpAddress $REPO
if [ $? == 0 -o $REPO == "REPO" ] ; then
# Si falla el cambio -> salimos con error repositorio no valido
- ogChangeRepo $REPO || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?)
+ ogChangeRepo $REPO ${OGUNIT%/} || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO $OGUNIT'; echo $?)
REPO="REPO"
fi
@@ -77,7 +80,7 @@ case "$PROTO" in
COMPRESS=$(ogGetImageCompressor REPO $IMGNAME)
#TODO comprobar parametros anteriores
ogEcho log session "[40] ogMcastReceiverPartition $DISK $PART $PORT $TOOL $COMPRESS"
- ogMcastRequest "$IMGNAME.img" "$PROTOOPT"
+ ogMcastRequest "$OGUNIT$IMGNAME.img" "$PROTOOPT"
ogExecAndLog command ogMcastReceiverPartition "$DISK" "$PART" "$PORT" "$TOOL" "$COMPRESS"
RETVAL=$?
;;