From 92824ee04f799f2dbb70ea4843cc1c4e1f0e5a20 Mon Sep 17 00:00:00 2001 From: David Noyes Date: Fri, 28 Aug 2015 14:44:25 +0000 Subject: [PATCH] Alternative test for dpkg multiarch support in lxc-debian template Signed-off-by: David Noyes --- templates/lxc-debian.in | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 50e623208..444234d8a 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -379,13 +379,9 @@ EOF # If the container isn't running a native architecture, setup multiarch if [ "${arch}" != "${hostarch}" ]; then - mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d - echo "foreign-architecture ${hostarch}" > ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch - # Test if dpkg supports multiarch - if chroot $rootfs dpkg -l dpkg 2>&1 | grep -q "unknown option 'foreign-architecture'"; then - echo "dpkg does not support multiarch: removing multiarch configuration file" - rm ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch + if ! chroot $rootfs dpkg --print-foreign-architecture 2>&1; then + chroot $rootfs dpkg --add-architecture ${hostarch} fi fi -- 2.47.2