diff options
-rwxr-xr-x | client/engine/Rsync.lib | 10 | ||||
-rwxr-xr-x | client/shared/scripts/createBaseImage | 3 | ||||
-rwxr-xr-x | client/shared/scripts/createDiffImage | 1 | ||||
-rwxr-xr-x | client/shared/scripts/restoreBaseImage | 1 | ||||
-rwxr-xr-x | client/shared/scripts/restoreDiffImage | 1 |
5 files changed, 11 insertions, 5 deletions
diff --git a/client/engine/Rsync.lib b/client/engine/Rsync.lib index bbb82269..a47dec83 100755 --- a/client/engine/Rsync.lib +++ b/client/engine/Rsync.lib @@ -394,10 +394,12 @@ else fi # Sincronizamos los datos de la partición a la imagen echo " rsync -aHAX$OPTRSYNC --progress --inplace --delete $FILESFROM $ORIG/ $DESTRSYNC" -rsync -aHAX$OPTRSYNC $PASSWORD --progress --inplace --delete $FILESFROM "$ORIG/" "$DESTRSYNC" 2>&1| egrep "^deleting|^sent|^sending|^total|%" &>> $OGLOGCOMMAND +rsync -aHAX$OPTRSYNC $PASSWORD --progress --inplace --delete $FILESFROM "$ORIG/" "$DESTRSYNC" 2>$OGLOGCOMMAND | egrep "^deleting|^sent|^sending|^total|%" |tee -a $OGLOGCOMMAND +RETVAL=${PIPESTATUS[0]} echo " rsync -aHAX$OPTRSYNC --inplace /tmp/ogimg* $DESTRSYNC" rsync -aHAX$OPTRSYNC $PASSWORD --inplace /tmp/ogimg* "$DESTRSYNC" +return $RETVAL } @@ -476,8 +478,8 @@ if [ "$3" == "diff" ]; then fi echo " rsync -aHAX$OPTRSYNC --progress $FILESFROM $ORIG/ $DESTRSYNC" -rsync -aHAX$OPTRSYNC $PASSWORD --progress $FILESFROM "$ORIG/" "$DESTRSYNC" 2>&1 | egrep "^deleting|^sent|^sending|^total|%" &>> $OGLOGCOMMAND - +rsync -aHAX$OPTRSYNC $PASSWORD --progress $FILESFROM "$ORIG/" "$DESTRSYNC" 2>$OGLOGCOMMAND | egrep "^deleting|^sent|^sending|^total|%" |tee -a $OGLOGCOMMAND +return ${PIPESTATUS[0]} } @@ -821,7 +823,7 @@ if [ $(uname -r|cut -d. -f2) -lt 7 ]; then mount -t ext4 -o loop "$IMGFILE" "$DIRMOUNT" 2>&1 | tee -a $OGLOGCOMMAND RETVAL=${PIPESTATUS[0]} else - mount -o compress=lzo "$IMGFILE" "$DIRMOUNT" 1>/dev/null | tee -a $OGLOGCOMMAND + mount -o compress=lzo "$IMGFILE" "$DIRMOUNT" 2>&1 | tee -a $OGLOGCOMMAND RETVAL=${PIPESTATUS[0]} fi ls -C "$DIRMOUNT" | tee -a $OGLOGCOMMAND diff --git a/client/shared/scripts/createBaseImage b/client/shared/scripts/createBaseImage index f870cdf7..9a4fe8bd 100755 --- a/client/shared/scripts/createBaseImage +++ b/client/shared/scripts/createBaseImage @@ -153,7 +153,8 @@ ogWaitMountImage "$3" "$4" $IMGEXT $SIZEREQUIRED || exit $(ogRaiseError session # Sincronizamos los datos de la particion con la imagen. ogEcho log session "[70] $MSG_HELP_ogSyncCreate." -ogSyncCreate $1 $2 $3 "$4" $IMGEXT +ogSyncCreate $1 $2 $3 "$4" $IMGEXT +[ $? == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" TIMEAUX5=$[SECONDS-TIMEAUX3] ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL: $[TIMEAUX5/60]m $[TIMEAUX5%60]s" diff --git a/client/shared/scripts/createDiffImage b/client/shared/scripts/createDiffImage index b24505a0..8d7ed20b 100755 --- a/client/shared/scripts/createDiffImage +++ b/client/shared/scripts/createDiffImage @@ -195,6 +195,7 @@ ogWaitMountImage "$3" "$5" "$DIFFTYPE" $SIZEREQUIRED || exit $(ogRaiseError ses ogEcho log session "[70] $MSG_HELP_ogSyncCreate" # Copio los datos a la imagen diferecial : ogSyncCreate $1 $2 $3 "$5" $DIFFTYPE +[ $? == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" TIMEAUX6=$[SECONDS-TIMEAUX5] ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL: $[TIMEAUX6/60]m $[TIMEAUX6%60]s" diff --git a/client/shared/scripts/restoreBaseImage b/client/shared/scripts/restoreBaseImage index 29ec3df4..b56ad05e 100755 --- a/client/shared/scripts/restoreBaseImage +++ b/client/shared/scripts/restoreBaseImage @@ -122,6 +122,7 @@ ogWaitMountImage "$1" "$2" "$IMGEXT" || exit $(ogRaiseError session $OG_ERR_DON # Sincronizamos la partición con la imagen. ogEcho log session "[60] $MSG_HELP_ogSyncRestore: $1 $2 $IMGEXT $3 $4" ogSyncRestore "$1" "$2" "$IMGEXT" $3 $4 +[ $? == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" TIMEAUX2=$[SECONDS-TIME2] ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL : $[TIMEAUX2/60]m $[TIMEAUX2%60]s" diff --git a/client/shared/scripts/restoreDiffImage b/client/shared/scripts/restoreDiffImage index 54edc045..604e72c1 100755 --- a/client/shared/scripts/restoreDiffImage +++ b/client/shared/scripts/restoreDiffImage @@ -109,6 +109,7 @@ ogLock $4 $5 # Sincronizamos la partición con la imagen. ogEcho log session "[60] $MSG_HELP_ogSyncRestore: $1 $3 $DIFFTYPE $4 $5" ogSyncRestore "$1" "$3" "$DIFFTYPE" $4 $5 +[ $? == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" # Desmontamos la imagen ogUnmountImage "$1" "$3" "$DIFFTYPE" |