[lxc-devel] [lxc/master] ubuntu: Fix package upgrades requiring proc

stgraber on Github lxc-bot at linuxcontainers.org
Mon Oct 24 23:10:09 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161024/3044368a/attachment.bin>
-------------- next part --------------
From e34466fe968ea5cf2004198abecf40f8dde02593 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 24 Oct 2016 17:38:13 -0400
Subject: [PATCH] ubuntu: Fix package upgrades requiring proc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 templates/lxc-ubuntu.in | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 92be563..8320993 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -403,7 +403,13 @@ exit 101
 EOF
     chmod +x "$1/partial-${arch}"/usr/sbin/policy-rc.d
 
-    lxc-unshare -s MOUNT -- chroot "$1/partial-${arch}" apt-get dist-upgrade -y || { suggest_flush; false; }
+    (
+        cat << EOF
+        mount -t proc proc "${1}/partial-${arch}/proc"
+        chroot "${1}/partial-${arch}" apt-get dist-upgrade -y
+EOF
+    ) | lxc-unshare -s MOUNT -- sh -eu || (suggest_flush; false)
+
     rm -f "$1/partial-${arch}"/usr/sbin/policy-rc.d
 
     chroot "$1/partial-${arch}" apt-get clean


More information about the lxc-devel mailing list