From: David Noyes Date: Fri, 28 Aug 2015 14:44:25 +0000 (+0000) Subject: Alternative test for dpkg multiarch support in lxc-debian template X-Git-Tag: lxc-2.0.0.beta1~165^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F643%2Fhead;p=thirdparty%2Flxc.git Alternative test for dpkg multiarch support in lxc-debian template Signed-off-by: David Noyes --- 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