From e34466fe968ea5cf2004198abecf40f8dde02593 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= 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=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- 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 92be563b0..8320993fa 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 -- 2.47.2