[25325] in Source-Commits
/svn/athena r24903 - trunk/debathena/scripts/installer
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Oct 20 15:48:14 2010
Date: Wed, 20 Oct 2010 15:48:08 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201010201948.o9KJm83m018101@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2010-10-20 15:48:07 -0400 (Wed, 20 Oct 2010)
New Revision: 24903
Modified:
trunk/debathena/scripts/installer/install-debathena.sh
Log:
Divert default background to make failed machines more conspicuous
Modified: trunk/debathena/scripts/installer/install-debathena.sh
===================================================================
--- trunk/debathena/scripts/installer/install-debathena.sh 2010-10-20 18:29:02 UTC (rev 24902)
+++ trunk/debathena/scripts/installer/install-debathena.sh 2010-10-20 19:48:07 UTC (rev 24903)
@@ -109,6 +109,20 @@
echo " Third-party software package: $tsoft"
echo ""
if [ "$pxetype" ] ; then
+ # Divert the default background and install our own so that failed machines
+ # are more conspicuous
+ echo "Diverting default background..."
+ bgimage=/usr/share/backgrounds/warty-final-ubuntu.png
+ divertedbg=no
+ if dpkg-divert --divert ${bgimage}.debathena --rename $bgimage; then
+ divertedbg=yes
+ if ! wget -N -O $bgimage http://debathena.mit.edu/error-background.png; then
+ echo "Hrm, that didn't work. Oh well..."
+ dpkg-divert --rename --remove $bgimage
+ divertedbg=no
+ fi
+ fi
+
# Setup for package installs in a chrooted immediately-postinstall environment.
echo "Setting locale."
export LANG
@@ -284,6 +298,13 @@
fi
# Post-install cleanup for cluster systems.
+if [ "$divertedbg" = "yes" ]; then
+ rm -f $bgimage
+ if ! dpkg-divert --rename --remove $bgimage; then
+ echo "Failed to remove diversion of background. You probably don't care."
+ fi
+fi
+
if [ cluster = "$category" ] ; then
# Force an /etc/adjtime entry so there's no confusion about whether the
# hardware clock is UTC or local.