summaryrefslogtreecommitdiffstats
path: root/lib/container
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-03-12 15:28:48 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-03-31 14:30:15 +0000
commitaf020b1fe5919b3f0a96dceccabf086f3e9f9744 (patch)
tree037c81ed5dd901a1e3b8e951ef108d5b43a952d9 /lib/container
parentCreating configuration directory. (diff)
downloadcompute-tools-af020b1fe5919b3f0a96dceccabf086f3e9f9744.tar.xz
compute-tools-af020b1fe5919b3f0a96dceccabf086f3e9f9744.zip
Adding native ARM architecture support in container start command.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xlib/container/start31
1 files changed, 25 insertions, 6 deletions
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" ]