]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-ubuntu: Fix building on secondary architectures
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 30 Mar 2016 05:25:53 +0000 (01:25 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 17 Nov 2016 23:07:08 +0000 (18:07 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-ubuntu.in

index 8e8856d0038c86a28dedc379499776b107226042..4aca62777d00c7bdfbdc3b97ab9bea691406a59e 100644 (file)
@@ -39,8 +39,6 @@ export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
 
 set -e
 
-MIRROR=${MIRROR:-http://archive.ubuntu.com/ubuntu}
-SECURITY_MIRROR=${SECURITY_MIRROR:-http://security.ubuntu.com/ubuntu}
 LOCALSTATEDIR="@LOCALSTATEDIR@"
 LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
 
@@ -296,6 +294,17 @@ download_ubuntu()
     arch=$2
     release=$3
 
+    case $2 in
+      amd64|i386)
+            MIRROR=${MIRROR:-http://archive.ubuntu.com/ubuntu}
+            SECURITY_MIRROR=${SECURITY_MIRROR:-http://security.ubuntu.com/ubuntu}
+            ;;
+      *)
+            MIRROR=${MIRROR:-http://ports.ubuntu.com/ubuntu-ports}
+            SECURITY_MIRROR=${SECURITY_MIRROR:-http://ports.ubuntu.com/ubuntu-ports}
+            ;;
+    esac
+
     packages_template=${packages_template:-"ssh,vim"}
 
     # Try to guess a list of langpacks to install