[25329] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r24903 - trunk/debathena/scripts/installer

daemon@ATHENA.MIT.EDU (Jonathan Reed)
Thu Nov 4 13:26:45 2010

Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1081)
From: Jonathan Reed <jdreed@MIT.EDU>
In-Reply-To: <201010201948.o9KJm83m018101@drugstore.mit.edu>
Date: Thu, 4 Nov 2010 13:26:37 -0400
Message-Id: <7C6F9797-4BCD-4203-902E-8ABDD5736634@mit.edu>
To: source-commits@mit.edu
Content-Transfer-Encoding: 8bit

I've tested this code, both for successful and unsuccessful (power-cycling during the debathena installation process) installations, and it works.  I'd like to push this to the locker soon.   Can I get an ACK?

-Jon

On Oct 20, 2010, at 3:48 PM, Jonathan D Reed wrote:

> 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.
> 



home help back first fref pref prev next nref lref last post