diff --git a/debian/changelog b/debian/changelog index d4769f4..e6d8b7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,8 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low initrds also suitable for DomU usage. Trigger update-initramfs. - By default install linux-image-virtual instead of linux-image-server on Ubuntu Intrepid and newer (Hopefully closes: #640099, LP #839492) + - Installs a legacy grub in all pygrub based DomUs to be able to + update the menu.list automatically. * Add debian/gbp.conf to be able to to build xen-tools with git-buildpackage. * Clean up debian/rules: diff --git a/hooks/common/82-install-grub-legacy b/hooks/common/82-install-grub-legacy new file mode 100755 index 0000000..8beb5ab --- /dev/null +++ b/hooks/common/82-install-grub-legacy @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Ensure that either modules-init-tools or kmod is setup. +# +# This is most likely required if you're using a custom kernel +# for your Xen system. But even if it isn't required it can't +# really do anything bad; just waste a bit of space. + + +prefix=$1 + + + +# +# Source our common functions +# +if [ -e /usr/lib/xen-tools/common.sh ]; then + . /usr/lib/xen-tools/common.sh +else + . ./hooks/common.sh +fi + + +# +# Log our start +# +logMessage Script $0 starting + +if [ ${pygrub} ]; then + +# +# Install the grub 0.9x package ("grub-legacy" on Debian, "grub" on Ubuntu) +# +if chroot ${prefix} /usr/bin/apt-cache show grub-legacy >/dev/null 2>/dev/null; then + installDebianPackage ${prefix} grub-legacy +else + installDebianPackage ${prefix} grub +fi + +else + logMessage "pygrub not set, skipping grub-legacy installation" +fi # if pygrub + +# +# Log our finish +# +logMessage Script $0 finished diff --git a/hooks/debian/82-install-grub-legacy b/hooks/debian/82-install-grub-legacy new file mode 120000 index 0000000..4cc2a3a --- /dev/null +++ b/hooks/debian/82-install-grub-legacy @@ -0,0 +1 @@ +../common/82-install-grub-legacy \ No newline at end of file diff --git a/hooks/edgy/82-install-grub-legacy b/hooks/edgy/82-install-grub-legacy new file mode 120000 index 0000000..4cc2a3a --- /dev/null +++ b/hooks/edgy/82-install-grub-legacy @@ -0,0 +1 @@ +../common/82-install-grub-legacy \ No newline at end of file diff --git a/hooks/intrepid/82-install-grub-legacy b/hooks/intrepid/82-install-grub-legacy new file mode 120000 index 0000000..4cc2a3a --- /dev/null +++ b/hooks/intrepid/82-install-grub-legacy @@ -0,0 +1 @@ +../common/82-install-grub-legacy \ No newline at end of file diff --git a/hooks/karmic/82-install-grub-legacy b/hooks/karmic/82-install-grub-legacy new file mode 120000 index 0000000..4cc2a3a --- /dev/null +++ b/hooks/karmic/82-install-grub-legacy @@ -0,0 +1 @@ +../common/82-install-grub-legacy \ No newline at end of file