[Lxc-users] lxc-ubuntu: Only replace i386 by i686 in lxc's config, otherwise debootstrap will fail

Stéphane Graber stgraber at ubuntu.com
Thu Jun 23 16:00:14 UTC 2011


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 templates/lxc-ubuntu.in |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 4f75336..b49542c 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -168,6 +168,12 @@ copy_configuration()
     rootfs=$2
     name=$3
 
+    if [ "$arch" = "i386" ]; then
+        lxc_arch="i686"
+    else
+        lxc_arch=$arch
+    fi
+
     cat <<EOF >> $path/config
 lxc.utsname = $name
 
@@ -175,7 +181,7 @@ lxc.tty = 4
 lxc.pts = 1024
 lxc.rootfs = $rootfs
 lxc.mount  = $path/fstab
-lxc.arch = $arch
+lxc.arch = $lxc_arch
 
 lxc.cgroup.devices.deny = a
 # /dev/null and zero
@@ -429,10 +435,6 @@ do
     esac
 done
 
-if [ "$arch" == "i386" ]; then
-    arch=i686
-fi
-
 if [ ! -z "$clean" -a -z "$path" ]; then
     clean || exit 1
     exit 0
-- 
1.7.5.4





More information about the lxc-users mailing list