Add -4 (ipv4) flag.
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Sat, 24 Oct 2009 13:58:53 +0000 (09:58 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Sat, 24 Oct 2009 13:58:53 +0000 (09:58 -0400)
csc-sync-debian
csc-sync-debian-cd
csc-sync-standard

index 9404cda..50f06cd 100755 (executable)
@@ -206,7 +206,7 @@ set +e
 if [[ "$TRACE_HOST" != "" ]]; then
     TRACE_OLD_TIME=`stat -c%Y $TO/$TRACE_DIR/$TRACE_HOST 2> /dev/null`
     TRACE_NEW_FILE=/tmp/$RSYNC_HOST_$RSYNC_DIR_$RANDOM
-    nice rsync -tv --address=$ADDRESS \
+    nice rsync -tv -4 --address=$ADDRESS \
         $RSYNC_HOST::$RSYNC_DIR/$TRACE_DIR/$TRACE_HOST \
         $TRACE_NEW_FILE >> $LOGFILE 2>&1
     TRACE_NEW_TIME=`stat -c%Y $TRACE_NEW_FILE`
@@ -221,7 +221,7 @@ fi
 # First sync /pool
 nice rsync -rlHtv \
      $TMP_EXCLUDE $EXCLUDE $SOURCE_EXCLUDE \
-     --timeout=3600 --address=$ADDRESS \
+     --timeout=3600 -4 --address=$ADDRESS \
      $RSYNC_HOST::$RSYNC_DIR/pool/ $TO/pool/ >> $LOGFILE 2>&1
 result=$?
 
@@ -230,7 +230,7 @@ if [ 0 = $result ]; then
        nice rsync -rlHtv --delay-updates --delete-after \
             --exclude "Archive-Update-in-Progress-${HOSTNAME}" \
             --exclude "${TRACE_DIR}/${HOSTNAME}" \
-            --timeout=3600 --address=$ADDRESS \
+            --timeout=3600 -4 --address=$ADDRESS \
             $TMP_EXCLUDE $EXCLUDE $SOURCE_EXCLUDE \
             $RSYNC_HOST::$RSYNC_DIR $TO >> $LOGFILE 2>&1
 
index ba63a39..5147832 100755 (executable)
@@ -95,7 +95,7 @@ set +e
 # Now sync the remaining stuff
 nice rsync -rlHtv --delete \
      --include='*businesscard*.iso' --include='*netinst*.iso' \
-     --exclude='*.iso' --timeout=3600 --address=$ADDRESS $TMP_EXCLUDE \
+     --exclude='*.iso' --timeout=3600 -4 --address=$ADDRESS $TMP_EXCLUDE \
      --exclude "Archive-Update-in-Progress-${HOSTNAME}" \
      $RSYNC_HOST::$RSYNC_DIR $TO >> $LOGFILE 2>&1
 if [[ "$?" != "0" ]]; then
index 0239f40..1aa2be5 100755 (executable)
@@ -99,14 +99,15 @@ trap "rm -f $LOCK" exit
 set +e
 
 # Now sync the remaining stuff
-nice rsync -rlHtv --delete \
+nice rsync -aHv --delete \
      --exclude "Archive-Update-in-Progress-${HOSTNAME}" \
-     --timeout=3600 --address=$ADDRESS $TMP_EXCLUDE $EXTRA \
+     --timeout=3600 -4 --address=$ADDRESS $TMP_EXCLUDE $EXTRA \
      $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
+chmod ug+rwx $TO
 
 savelog $LOGFILE >/dev/null