Install grub-legacy in all pygrub-based DomUs
This commit is contained in:
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -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:
|
||||
|
||||
47
hooks/common/82-install-grub-legacy
Executable file
47
hooks/common/82-install-grub-legacy
Executable file
@@ -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
|
||||
1
hooks/debian/82-install-grub-legacy
Symbolic link
1
hooks/debian/82-install-grub-legacy
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/82-install-grub-legacy
|
||||
1
hooks/edgy/82-install-grub-legacy
Symbolic link
1
hooks/edgy/82-install-grub-legacy
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/82-install-grub-legacy
|
||||
1
hooks/intrepid/82-install-grub-legacy
Symbolic link
1
hooks/intrepid/82-install-grub-legacy
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/82-install-grub-legacy
|
||||
1
hooks/karmic/82-install-grub-legacy
Symbolic link
1
hooks/karmic/82-install-grub-legacy
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/82-install-grub-legacy
|
||||
Reference in New Issue
Block a user