Write error message on error
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 18 Apr 2008 23:36:27 +0000 (19:36 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 18 Apr 2008 23:36:27 +0000 (19:36 -0400)
csc-sync-standard

index 1b493b8..5385acd 100755 (executable)
@@ -102,6 +102,10 @@ rsync --recursive --links --hard-links --times --verbose --delay-updates --delet
      --exclude "Archive-Update-in-Progress-${HOSTNAME}" \
      --address=$ADDRESS $TMP_EXCLUDE \
      $RSYNC_HOST::$RSYNC_DIR $TO >> $LOGFILE 2>&1
+if [[ "$?" != "0" ]]; then
+    echo "ERROR: Help, something weird happened" | tee -a $LOGFILE
+    echo "mirroring /pool exited with exitcode" $result | tee -a $LOGFILE
+fi
 
 savelog $LOGFILE >/dev/null