summaryrefslogtreecommitdiffstats
path: root/client/shared/scripts/createDiffImage
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2013-11-25 13:41:59 +0000
committeririna <irinagomez@us.es>2013-11-25 13:41:59 +0000
commitef938d25df3df263b1ce928f5db71684f0f4bd6b (patch)
treebdc48e896ca2623c2fc8d4a37bb93044041d3238 /client/shared/scripts/createDiffImage
parent8d3a9e0b43b14ce4674c347126b9523798d39ee4 (diff)
#565 Adaptación script sincronizadas version 2 a la consola de administración
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4091 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/scripts/createDiffImage')
-rwxr-xr-xclient/shared/scripts/createDiffImage8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/shared/scripts/createDiffImage b/client/shared/scripts/createDiffImage
index c2905ab3..3c6d33cc 100755
--- a/client/shared/scripts/createDiffImage
+++ b/client/shared/scripts/createDiffImage
@@ -33,7 +33,8 @@ trap "onexit $1 $2 $3 \"$4\" \"$5\"" 1 2 3 6 9 14 15 ERR
function onexit() {
local exit_status=$?
- echo "$MSG_ERR_GENERIC $exit_status" |tee -a $OGLOGFILE $OGLOGSESSION
+ local MSG="$(ogRaiseError $exit_status \"$1 $2 $3 $4 $5\" 2>&1)"
+ echo "$MSG" |tee -a $OGLOGFILE $OGLOGSESSION
ogUnmountImage $3 "$5" $DIFFTYPE &>/dev/null
ogUnmountImage $3 "$4" $IMGEXT &>/dev/null
if [ $exit_status -ne 4 ]; then
@@ -69,6 +70,10 @@ fi
IMGEXT="img"
DIFFEXT="img.diff"
DIFFTYPE="diff"
+
+# Limpiamos los archivo de log
+echo -n "" >$OGLOGCOMMAND; echo -n "" $OGLOGSESSION
+
echo "[1] $MSG_SCRIPTS_START $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE
# Comprobamos si la imagen diferencial o la particion estan bloqueada:
@@ -83,7 +88,6 @@ ogIsSyncImage "$3" "$4" "img" || ogRaiseError $OG_ERR_DONTSYNC_IMAGE "$3 $4"
# Comprobar que no está bloqueada
ogIsImageLocked "$3" "$4.$IMGEXT" && ogRaiseError $OG_ERR_LOCKED "$3 $4.$IMGEXT"
-echo " " > $OGLOGCOMMAND
# Si el repositorio es CACHE comprobamos que exista
if [ "$3" == "CACHE" -o "$3" == "cache" ]; then
! ogFindCache >/dev/null && ogRaiseError $OG_ERR_NOTCACHE "CACHE "