]> asedeno.scripts.mit.edu Git - sipb-mirrors.git/commitdiff
Ignore exit status 23 and 24 from rsync
authorAnders Kaseorg <andersk@mit.edu>
Wed, 14 Oct 2015 19:49:15 +0000 (15:49 -0400)
committerLizhou Sha <slz@mit.edu>
Wed, 14 Oct 2015 20:33:16 +0000 (16:33 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Lizhou Sha <slz@mit.edu>
OPTIONS.sh

index faa85b06c3dc9f6329304def1253a49e6b3c4371..c213458297fee1c738fa8cba54591e81f63f527e 100644 (file)
@@ -1 +1,13 @@
 MIRRORDIR=/ifs/mirror
+
+rsync () {
+    # Ignore these exit statuses from rsync:
+    #   23  Partial transfer due to error
+    #   24  Partial transfer due to vanished source files
+    command rsync "$@" || (
+        case "$?" in
+            23 | 24) echo "mirrors.mit.edu: Ignoring rsync exit status $?" >&2;;
+            *) exit $?
+        esac
+    )
+}