]> gitweb.fluxo.info Git - backupninja.git/commitdiff
Ensure that a non-zero rsync exit status is caught by our handler (#3892)
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 10 May 2012 21:47:11 +0000 (18:47 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 10 May 2012 21:47:11 +0000 (18:47 -0300)
handlers/rsync.in

index 884a885f96fa6c20ea9d90a27744efa19a8e8dd4..73507c8db4d796ea3c848f77601bf50c26b0eece 100644 (file)
@@ -1121,6 +1121,9 @@ for SECTION in $include; do
   set_filelist
   set_dest
 
+  # Ensure that a non-zero rsync exit status is caught by our handler
+  set -o pipefail
+
   info "Syncing $SECTION on $dest_path..."
   debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path
   $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log