Commit 8339b4c8 by Serge Hallyn Committed by Daniel Lezcano

lxc-ubuntu: Base arch detection code on debootstrap's with some additions when…

lxc-ubuntu: Base arch detection code on debootstrap's with some additions when we don't have dpkg or udpkg Changelog: [seh] Don't take arch from environment Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent e2b4064f
...@@ -393,14 +393,24 @@ eval set -- "$options" ...@@ -393,14 +393,24 @@ eval set -- "$options"
release=lucid release=lucid
bindhome= bindhome=
arch=$(arch) arch=$(arch)
trim_container=0
if [ "$arch" == "x86_64" ]; then arch=amd64
fi
if [ "$arch" == "i686" ]; then # Code taken from debootstrap
arch=i386 if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then
arch=`/usr/bin/dpkg --print-architecture`
elif type udpkg >/dev/null 2>&1 && udpkg --print-architecture >/dev/null 2>&1; then
arch=`/usr/bin/udpkg --print-architecture`
else
arch=$(arch)
if [ "$arch" = "i686" ]; then
arch="i386"
elif [ "$arch" = "x86_64" ]; then
arch="amd64"
elif [ "$arch" = "armv7l" ]; then
arch="armel"
fi
fi fi
trim_container=0
hostarch=$arch hostarch=$arch
while true while true
do do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment