[26030] in Source-Commits
Re: /svn/athena r25351 - trunk/debathena/config/auto-update/debian
daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Wed Aug 3 15:01:28 2011
Date: Wed, 3 Aug 2011 15:01:21 -0400 (EDT)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: Jonathan D Reed <jdreed@mit.edu>
cc: source-commits@mit.edu
In-Reply-To: <201108031629.p73GTrd8022139@drugstore.mit.edu>
Message-ID: <alpine.DEB.2.00.1108031501170.6597@tyger.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
BAWK
--
Geoffrey Thomas
geofft@mit.edu
On Wed, 3 Aug 2011, Jonathan D Reed wrote:
> Author: jdreed
> Date: 2011-08-03 12:29:53 -0400 (Wed, 03 Aug 2011)
> New Revision: 25351
>
> Modified:
> trunk/debathena/config/auto-update/debian/athena-auto-upgrade
> trunk/debathena/config/auto-update/debian/changelog
> Log:
> In auto-update:
> * Only wave dead chickens on cluster hardware
> * It's pointless to reboot if we haven't loaded a kexec kernel
>
>
> Modified: trunk/debathena/config/auto-update/debian/athena-auto-upgrade
> ===================================================================
> --- trunk/debathena/config/auto-update/debian/athena-auto-upgrade 2011-08-03 12:49:09 UTC (rev 25350)
> +++ trunk/debathena/config/auto-update/debian/athena-auto-upgrade 2011-08-03 16:29:53 UTC (rev 25351)
> @@ -174,26 +174,43 @@
> interface=auto \
> url=http://18.9.60.73/installer/${UBUNTU_RELEASE}/debathena.preseed \
> debathena/pxetype=cluster --"
> +dead_chicken() {
> + debug "Waving dead chicken..."
> + # Run the video card's POST to reset it
> + vbetool post
> + # Disable the framebuffer, falling back to VGA
> + echo 0 > /sys/class/vtconsole/vtcon1/bind
> +}
> product_name="$(cat /sys/class/dmi/id/product_name | sed -e 's/[ ]*$//')"
> # Yes, really. The actual value of product_name on the Vostro is:
> # "Vostro 320 "
> case "$product_name" in
> - "OptiPlex 790")
> - debug "Adding 'reboot=pci' for Dell 790"
> - kargs="$kargs reboot=pci"
> + # This is not so much Vostro 320-specific as it is i915 specific
> + # Known to be necessary on PCI ID 8086:2e32, rev 03
> + # Actually, on all hardware, because Dell sucks. Or possibly Ubuntu.
> + OptiPlex*)
> + model="$(echo "$product_name" | cut -d\ -f2)"
> + case "$model" in
> + 790)
> + debug "Adding 'reboot=pci' for Dell 790"
> + kargs="$kargs reboot=pci"
> + dead_chicken
> + ;;
> + GX620|745|755|760|780)
> + dead_chicken
> + ;;
> + esac
> ;;
> + Vostro\ 320)
> + dead_chicken
> + ;;
> + *)
> + echo "You appear to have functional hardware. Huzzah."
> + ;;
> esac
> if [ $(echo $kargs | wc -c) -ge 512 ]; then
> complain "kargs exceeds 512 bytes. That's not good."
> fi
> -# This is not so much Vostro 320-specific as it is i915 specific
> -# Known to be necessary on PCI ID 8086:2e32, rev 03
> -# Actually, on all hardware, because Dell sucks. Or possibly Ubuntu.
> -debug "Waving dead chicken..."
> -# Run the video card's POST to reset it
> -vbetool post
> -# Disable the framebuffer, falling back to VGA
> -echo 0 > /sys/class/vtconsole/vtcon1/bind
> # Don't kexec -e here, because modern Ubuntu is unable to kexec while
> # X is running. Instead, kexec -l and let the init script take care of.
> # Until Oneiric, when this will probably stop working if kexec-tools hasn't
> @@ -201,9 +218,9 @@
> $MAYBE /sbin/kexec -l linux --append="$dkargs $kargs" --initrd=initrd.gz
> [ $DEBUG -eq 1 ] && exit 0
> if [ "`cat /sys/kernel/kexec_loaded`" != "1" ]; then
> - echo "Hrm, looks like kexec -l didn't work. This upgrade might fail."
> -else
> - echo "Kernel loaded. Rebooting in order to exec it."
> + echo "Hrm, looks like kexec -l didn't work. This upgrade will fail."
> + exit 1
> fi
> +echo "Kernel loaded. Rebooting in order to exec it."
> reboot
> exit 0
>
> Modified: trunk/debathena/config/auto-update/debian/changelog
> ===================================================================
> --- trunk/debathena/config/auto-update/debian/changelog 2011-08-03 12:49:09 UTC (rev 25350)
> +++ trunk/debathena/config/auto-update/debian/changelog 2011-08-03 16:29:53 UTC (rev 25351)
> @@ -1,3 +1,10 @@
> +debathena-auto-update (1.29) unstable; urgency=low
> +
> + * Only wave dead chickens on cluster hardware
> + * It's pointless to reboot if we haven't loaded a kexec kernel
> +
> + -- Jonathan Reed <jdreed@mit.edu> Wed, 03 Aug 2011 12:06:11 -0400
> +
> debathena-auto-update (1.28) unstable; urgency=low
>
> * Always wave dead chickens
>
>