The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1663

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
In case if 'qemu-debootstrap' binary is not available then container
creation with 'lxc-ubuntu' template fail.

Signed-off-by: Denis Pynkin <denis.pyn...@collabora.com>
From 2444157d85fc3e4d7f4d4e8fda4ff99244f286d8 Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pyn...@collabora.com>
Date: Sat, 1 Jul 2017 16:55:09 +0300
Subject: [PATCH] Fix lxc-ubuntu template usage without qemu-debootstrap

In case if 'qemu-debootstrap' binary is not available then container
creation with 'lxc-ubuntu' template fail.

Signed-off-by: Denis Pynkin <denis.pyn...@collabora.com>
---
 templates/lxc-ubuntu.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 81d6b6ca2..5e8041a94 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -375,7 +375,7 @@ download_ubuntu()
     choose_container_proxy $cache/partial-$arch/ $arch
     # download a mini ubuntu into a cache
     echo "Downloading ubuntu $release minimal ..."
-    if [ -n "$(which qemu-debootstrap)" ]; then
+    if [ -n "$(which qemu-debootstrap 2>/dev/null || :)" ]; then
         qemu-debootstrap --verbose $debootstrap_parameters 
--components=main,universe --arch=$arch --include=${packages_template} $release 
$cache/partial-$arch $MIRROR
     else
         debootstrap --verbose $debootstrap_parameters 
--components=main,universe --arch=$arch --include=${packages_template} $release 
$cache/partial-$arch $MIRROR
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to