From 1e2281fe0b7e9bda3192231e42f5798ede8de3c0 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Wed, 19 Nov 2008 20:05:15 -0500 Subject: [PATCH] Install the right kernel on both Debian and Ubuntu - both 32 and 64 bit svn path=/trunk/packages/invirt-autoinstaller/; revision=1719 --- common/usr/lib/xen-tools/debian.d/97-setup-grub | 18 +++++++++++++++--- debian/changelog | 7 +++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/97-setup-grub b/common/usr/lib/xen-tools/debian.d/97-setup-grub index 4013ac4..28555a6 100755 --- a/common/usr/lib/xen-tools/debian.d/97-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/97-setup-grub @@ -22,9 +22,21 @@ logMessage Script $0 starting # # Install the xen kernel. linux-image-xen is in ubuntu, -# linux-image-xen-amd64 in debian. -installDebianPackage ${prefix} linux-image-xen -installDebianPackage ${prefix} linux-image-xen-amd64 +# linux-image-xen-{amd64,686} in debian. +# + +# First we need to figure out whether we're dealing with Debian or +# Ubuntu. Unfortunately, Debian doesn't install lsb_release by +# default, and its lsb-release package Recommends a bunch of stuff +installDebianPackage ${prefix} -o="Apt::Install-Recommends=false" lsb-release +if [ "Debian" = "$(chroot ${prefix} lsb_release -si)" ]; then + # One of these exists in the amd64 repo, and one of them exists in + # the i386 repo. The one that doesn't exist won't get installed + installDebianPackage ${prefix} linux-image-xen-amd64 + installDebianPackage ${prefix} linux-image-xen-686 +else + installDebianPackage ${prefix} linux-image-xen +fi installDebianPackage ${prefix} grub diff --git a/debian/changelog b/debian/changelog index df199de..a407d87 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-autoinstaller (0.0.4) unstable; urgency=low + + * Figure out whether the autoinstaller is running on Debian or Ubuntu, + and install an appropriate kernel + + -- Evan Broder Wed, 19 Nov 2008 19:53:25 -0500 + invirt-autoinstaller (0.0.3) unstable; urgency=low * Whoops - replace the right string in /etc/rc.local -- 1.7.9.5