diff options
author | irina <irinagomez@us.es> | 2014-03-19 10:29:56 +0000 |
---|---|---|
committer | irina <irinagomez@us.es> | 2014-03-19 10:29:56 +0000 |
commit | 0b914892a5a539c94b3f660c29180e46546e5f9f (patch) | |
tree | f3764207d2775761d78035044328a0775ae748ac /client/engine/Rsync.lib | |
parent | 2fc81c46b542992ffffa212a15c6284e4bf3694e (diff) |
#565 Se controla el error en la transferencia de rsync y se muestra aviso
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4195 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Rsync.lib')
-rwxr-xr-x | client/engine/Rsync.lib | 10 |
1 files changed, 6 insertions, 4 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 |