From af020b1fe5919b3f0a96dceccabf086f3e9f9744 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 12 Mar 2016 16:28:48 +0100 Subject: Adding native ARM architecture support in container start command. Signed-off-by: Daniel Baumann --- lib/container/start | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/container/start b/lib/container/start index d47ed6b..dc84f94 100755 --- a/lib/container/start +++ b/lib/container/start @@ -90,12 +90,31 @@ esac HOST_ARCHITECTURE="$(dpkg --print-architecture)" MACHINE_ARCHITECTURE="$(chroot ${MACHINES}/${NAME} dpkg --print-architecture)" -if [ "${HOST_ARCHITECTURE}" = "amd64" ] && [ "${MACHINE_ARCHITECTURE}" = "i386" ] -then - SETARCH="setarch i686" -else - SETARCH="" -fi +case "${HOST_ARCHITECTURE}" in + amd64) + case "${MACHINE_ARCHITECTURE}" in + i386) + SETARCH="setarch i686" + ;; + + *) + SETARCH="" + ;; + esac + ;; + + arm64) + case "${MACHINE_ARCHITECTURE}" in + armel|armhf) + SETARCH="setarch armv7l" + ;; + + *) + SETARCH="" + ;; + esac + ;; +esac # config if [ -e "${CONFIG}/${NAME}.conf" ] -- cgit v1.2.3