[25770] in Source-Commits
/svn/athena r25222 - trunk/debathena/scripts/installer
daemon@ATHENA.MIT.EDU (andrew m. boardman)
Fri Jul 8 22:03:45 2011
Date: Fri, 8 Jul 2011 22:03:39 -0400
From: "andrew m. boardman" <amb@MIT.EDU>
Message-Id: <201107090203.p6923d9D008232@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: amb
Date: 2011-07-08 22:03:39 -0400 (Fri, 08 Jul 2011)
New Revision: 25222
Modified:
trunk/debathena/scripts/installer/install-debathena.beta.sh
Log:
Extract only one line of the hesiod cluster info, which can contain
multiple entries.
Modified: trunk/debathena/scripts/installer/install-debathena.beta.sh
===================================================================
--- trunk/debathena/scripts/installer/install-debathena.beta.sh 2011-07-05 18:32:09 UTC (rev 25221)
+++ trunk/debathena/scripts/installer/install-debathena.beta.sh 2011-07-09 02:03:39 UTC (rev 25222)
@@ -244,8 +244,11 @@
sourceslist=/etc/apt/sources.list.d/debathena.list
clustersourceslist=/etc/apt/sources.list.d/debathena.clusterinfo.list
if [ -z "$hostname" ] ; then hostname=`hostname` ; fi
+
+# Note that hesiod may contain multiple apt_release lines. We want, in order
+# of priority, just one of "bleeding" (maybe), "development", or "proposed".
hescluster=$(dig +short +bufsize=2048 ${hostname}.cluster.ns.athena.mit.edu TXT \
- |sed -e 's/"$//' -ne 's/^"apt_release //p') || hescluster=""
+ |sed -e 's/"$//' -ne 's/^"apt_release //p'|sort|head -1) || hescluster=""
if [ ! -e "$sourceslist" ] || ! grep -q debathena "$sourceslist"; then
if [ -e "$sourceslist" ]; then