#!/bin/sh
#
#   $Id: mirror.centos 141 2006-10-04 17:28:41Z finley $
#
#   2005.02.09  Brian Elliott Finley
#   - created
#   2005.06.21  Brian Elliott Finley
#   - refined
#
. /opt/alpaca-farm/lib/functions
. /opt/alpaca-farm/lib/variables

#
# WARNING!!!  Be _sure_ to set DEST first.  So's that you don't accidentally
#             overwrite a good mirror, eh?
#

# Uncomment these two, and change, if using a password.
# RSYNC_USER="bogus_user@"
# OPTS="$OPTS --password-file /home/mirror/CHANGE_ME.passwd"

DEST=`/opt/alpaca-farm/bin/which_nfs_mount_point centos`
SOURCE="${RSYNC_USER}msync.centos.org::CentOS"
# SOURCE="rsync://${RSYNC_USER}masterdistfiles.bogus.org/bogus"

lock_it

echo rsync $OPTS $SOURCE/ $DEST/
rsync $OPTS $SOURCE/ $DEST/ && stamp_it_good || stamp_it_bad

hardlink_identical_files
unlock_it

