diff options
author | irina <irinagomez@us.es> | 2015-12-15 10:17:59 +0000 |
---|---|---|
committer | irina <irinagomez@us.es> | 2015-12-15 10:17:59 +0000 |
commit | dc157aebd8235ffac8fa7075d33bc143ef489714 (patch) | |
tree | ed77eb706bd599f27923bb14a158dc0e083e0615 /client/shared/scripts/restoreImage | |
parent | 79a417549b502d8383e1fa66702077d374df570e (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-x | client/shared/scripts/restoreImage | 7 |
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=$? ;; |