Add --hard-links to rsync options
authorPeter Palfrader <peter@palfrader.org>
Mon, 17 Dec 2012 13:45:46 +0000 (14:45 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 17 Dec 2012 13:45:46 +0000 (14:45 +0100)
modules/roles/files/static-mirroring/static-master-ssh-wrap
modules/roles/files/static-mirroring/static-master-update-component
modules/roles/files/static-mirroring/static-mirror-run
modules/roles/files/static-mirroring/static-mirror-ssh-wrap
modules/roles/manifests/static_mirror.pp

index 6041a56..9c543bf 100755 (executable)
@@ -73,7 +73,7 @@ lock() {
 do_rsync() {
        local remote_host="$1"; shift
 
-       local args="--server --sender -vltrze.iLsf --safe-links ."
+       local args="--server --sender -vlHtrze.iLsf --safe-links ."
        if [ "$*" = "$args -new-/" ] || [ "$*" = "$args ./-new-/" ] ; then
                local path="$BASEDIR/current-push"
                info "serving $remote_host with $path"
index af8a5f7..6f7ff03 100755 (executable)
@@ -110,7 +110,7 @@ echo "$0: Got them."
 echo "$0: Updating master copy of $component..."
 rsync --delete \
   -trz \
-  --links --safe-links \
+  --links --hard-links --safe-links \
   --link-dest="$tgt" \
   "$src/." "$tmpdir_new/."
 echo "$0: Done.  Committing."
index b2bc078..038700d 100755 (executable)
@@ -64,7 +64,7 @@ if [ -z "$BASEDIR" ]; then usage >&2; exit 1; fi
 if [ -z "$SYNC_SOURCE" ]; then usage >&2; exit 1; fi
 
 RSYNC="rsync"
-RSYNC_BASE_OPTIONS="-rtvz --delete --links --safe-links"
+RSYNC_BASE_OPTIONS="-rtvz --delete --links --hard-links --safe-links"
 RSYNC_SSH_OPTIONS="ssh -o AddressFamily=inet -o BatchMode=yes"
 
 LOGDIR="$HOME/logs"
index 9114879..3b1d998 100755 (executable)
@@ -76,7 +76,7 @@ do_rsync() {
 
        if [ -e "$COMPONENTLIST" ]; then
                for path in $(awk -v host="$(hostname -f)" '$2 == host {print $3}' $COMPONENTLIST); do
-                       allowed_rsyncs+=("--server --sender -ltrze.iLsf --safe-links . $path/.")
+                       allowed_rsyncs+=("--server --sender -ltHrze.iLsf --safe-links . $path/.")
                done
        fi
        for cmd_idx in ${!allowed_rsyncs[*]}; do
index cc9b210..c98464c 100644 (file)
@@ -40,7 +40,7 @@ class roles::static_mirror {
                content => template('roles/static-mirroring/vhost/planet.debian.org.erb'),
        }
 
-       apache2::site { '10-static-vhosts-simple':
+       apache2::site { '010-static-vhosts-simple':
                site => "static-vhosts-simple",
                content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'),
        }