From be7d3ba23f61b57e4e54fe5185e1bbc23f871a64 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 25 Jan 2013 10:22:39 +0100 Subject: [PATCH] fixup: fix liveboot_rsync to not fail (completly) if a destination datacenter is down (like pbb-de atm) --- liveboot_rsync.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/liveboot_rsync.sh b/liveboot_rsync.sh index e045359..ba393fd 100755 --- a/liveboot_rsync.sh +++ b/liveboot_rsync.sh @@ -13,6 +13,9 @@ export RSYNC_SRC=/srv/mirror/liveboot RSYNC_FILTER='' +# +# destination patterns, must contain username and path and trailing slash, aka $USER@$HOST/$PATH/ +# # ri server RSYNC_DST1="liveboot@riserver/liveboot/" # storage DC (mgmt11) @@ -28,7 +31,7 @@ ping_and_rsync() { # # only try to rsync if destination is pingable # - if ping -c 1 $(echo $1 | sed -s 's#.*@\([0-9.]*\).*#\1#' ) > /dev/null ; then + if ping -c 1 $(echo $1 | sed -s 's#.*@\(.*\)/.*/#\1#' ) > /dev/null ; then echo "Now rsyncing results to $1 ..." rsync --password-file /etc/rsynclivebuild-send.pass -avv --delete --delete-excluded $RSYNC_FILTER $RSYNC_SRC/ rsync://$1 figlet "$2 OK" -- 2.39.5