Bug#778907: adt-setup-vm: configure grub only if it is installed
Christian Kastner
debian at kvr.at
Sat Feb 21 17:05:32 UTC 2015
On Sat, 21 Feb 2015 17:59:13 +0100 Christian Kastner <debian at kvr.at> wrote:
> Tags: patch
> When generating images for i386, adt-setup-vm fails if grub isn't
> installed (eg vmdebootstrap uses extlinux by default).
Sorry, noticed too late that I grabbed the wrong patch version :-/
Please find attached an updated version. The previous one was missing
the $root prefix for the VM guest.
Regards,
Christian
-------------- next part --------------
From 9a82fd8220312d9c84657c5d5009955c7e678c8b Mon Sep 17 00:00:00 2001
From: Christian Kastner <ckk at kvr.at>
Date: Sat, 21 Feb 2015 17:52:56 +0100
Subject: [PATCH] Configure grub only if it is installed
---
tools/adt-setup-vm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/adt-setup-vm b/tools/adt-setup-vm
index 9be5bd5..d978f3f 100755
--- a/tools/adt-setup-vm
+++ b/tools/adt-setup-vm
@@ -127,7 +127,7 @@ if [ -n "${ADT_APT_PROXY:-}" ]; then
fi
# bump vmalloc on i386, necessary for tests like udisks2
-if [ "$(chroot "$root" dpkg --print-architecture)" = "i386" ]; then
+if [ "$(chroot "$root" dpkg --print-architecture)" = "i386" ] && [ -d "$root/etc/default/grub.d" ]; then
echo 'GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0 vmalloc=512M"' > \
"$root/etc/default/grub.d/90-adt-vmalloc.cfg"
chroot "$root" update-grub
--
2.1.4
More information about the autopkgtest-devel
mailing list