diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2012-05-12 21:48:43 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2012-05-12 21:48:43 -0300 | 
| commit | 118d7587b6d4ad34224b7bf7370bdfbe941ffe3c (patch) | |
| tree | 3b84f4710ba9d3826ee494a318746792d6f632cc | |
| parent | fbf25018bea6b5cb630ee15b401b385d5e9f7084 (diff) | |
| download | backupninja-118d7587b6d4ad34224b7bf7370bdfbe941ffe3c.tar.gz backupninja-118d7587b6d4ad34224b7bf7370bdfbe941ffe3c.tar.bz2  | |
Changing pipefail just when it's really needed
| -rw-r--r-- | handlers/rsync.in | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in index 85e1c99..1f7fb4d 100644 --- a/handlers/rsync.in +++ b/handlers/rsync.in @@ -1131,7 +1131,6 @@ set_rsync_options  start_mux  stop_services  mount_rw -set_pipefail  starttime="`date +%c%n%s`"  echo "Starting backup at `echo $starttime | head -n 1`" >> $log @@ -1146,17 +1145,18 @@ for SECTION in $include; do    info "Syncing $SECTION on $dest_path..."    debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path +  set_pipefail    $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log    if [ "$?" != "0" ]; then      fatal "Rsync error when trying to transfer $SECTION"    fi +  restore_pipefail    update_metadata  done -restore_pipefail  mount_ro  run_fsck  start_services  | 
