From 50041855cc0cfc756488826b8123b75d463c180a Mon Sep 17 00:00:00 2001
From: Faiyaz Ahmed <faiyaza@cs.princeton.edu>
Date: Fri, 9 Feb 2007 21:45:26 +0000
Subject: [PATCH] scp's nightlies to both boot servers {boot1,boot2}.

---
 planetlab.mk | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/planetlab.mk b/planetlab.mk
index 38eb502d..83cdf3c9 100644
--- a/planetlab.mk
+++ b/planetlab.mk
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2003-2006 The Trustees of Princeton University
 #
-# $Id: planetlab.mk,v 1.48 2007/02/08 06:00:58 mlhuang Exp $
+# $Id: planetlab.mk,v 1.49 2007/02/08 15:18:08 mlhuang Exp $
 #
 
 #
@@ -358,7 +358,8 @@ ALL += myplc-devel
 # 
 
 # Upload packages to boot server
-SERVER := build@boot.planet-lab.org
+SERVERA := build@boot1.planet-lab.org
+SERVERB := build@boot2.planet-lab.org
 ARCHIVE := /plc/data/var/www/html/install-rpms/archive
 
 # Put nightly alpha builds in a subdirectory
@@ -387,7 +388,8 @@ ifneq ($(wildcard /etc/planetlab/secring.gpg),)
 endif
 ifneq ($(BUILDS),)
         # Remove old runs
-	echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
+	echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERA) /bin/bash -s
+	echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERB) /bin/bash -s
 endif
         # Create package manifest
 	sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
@@ -398,11 +400,19 @@ endif
 	rsync \
 	--exclude '*-debuginfo-*' \
 	--recursive --links --perms --times --group --compress --rsh=ssh \
-	RPMS/ $(SERVER):$(ARCHIVE)/$(BASE)
+	RPMS/ $(SERVERA):$(ARCHIVE)/$(BASE)
+	rsync \
+	--exclude '*-debuginfo-*' \
+	--recursive --links --perms --times --group --compress --rsh=ssh \
+	RPMS/ $(SERVERB):$(ARCHIVE)/$(BASE)
+
 ifeq ($(TAG),HEAD)
         # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
-	if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
-	    ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \
+	if ! ssh $(SERVERA) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
+	    ssh $(SERVERA) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \
+	fi
+	if ! ssh $(SERVERB) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
+	    ssh $(SERVERB) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \
 	fi
 endif
 endif
-- 
2.47.0