[lxc-devel] [PATCH 1/2] Convert all Debian (and derivative) templates from using 'arch' to using 'dpkg --print-architecture' as debootstrap does
Stéphane Graber
stgraber at ubuntu.com
Tue May 24 18:19:08 UTC 2011
---
templates/lxc-debian.in | 9 +--------
templates/lxc-lenny.in | 9 +--------
templates/lxc-lucid.in | 9 +--------
templates/lxc-maverick.in | 9 +--------
templates/lxc-natty.in | 9 +--------
5 files changed, 5 insertions(+), 40 deletions(-)
diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index 27c041e..75a33a4 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -158,14 +158,7 @@ install_debian()
return 1
fi
- arch=$(arch)
- if [ "$arch" == "x86_64" ]; then
- arch=amd64
- fi
-
- if [ "$arch" == "i686" ]; then
- arch=i386
- fi
+ arch=$(dpkg --print-architecture)
echo "Checking cache download in $cache/rootfs-$SUITE-$arch ... "
if [ ! -e "$cache/rootfs-$SUITE-$arch" ]; then
diff --git a/templates/lxc-lenny.in b/templates/lxc-lenny.in
index 0f37988..3720dce 100644
--- a/templates/lxc-lenny.in
+++ b/templates/lxc-lenny.in
@@ -148,14 +148,7 @@ install_debian()
return 1
fi
- arch=$(arch)
- if [ "$arch" == "x86_64" ]; then
- arch=amd64
- fi
-
- if [ "$arch" == "i686" ]; then
- arch=i386
- fi
+ arch=$(dpkg --print-architecture)
echo "Checking cache download in $cache/rootfs-$SUITE-$arch ... "
if [ ! -e "$cache/rootfs-$SUITE-$arch" ]; then
diff --git a/templates/lxc-lucid.in b/templates/lxc-lucid.in
index fe61313..88a4618 100644
--- a/templates/lxc-lucid.in
+++ b/templates/lxc-lucid.in
@@ -194,14 +194,7 @@ install_ubuntu()
return 1
fi
- arch=$(arch)
- if [ "$arch" == "x86_64" ]; then
- arch=amd64
- fi
-
- if [ "$arch" == "i686" ]; then
- arch=i386
- fi
+ arch=$(dpkg --print-architecture)
echo "Checking cache download in $cache/rootfs-$arch ... "
if [ ! -e "$cache/rootfs-$arch" ]; then
diff --git a/templates/lxc-maverick.in b/templates/lxc-maverick.in
index 0a8ac8e..23ecefa 100644
--- a/templates/lxc-maverick.in
+++ b/templates/lxc-maverick.in
@@ -117,14 +117,7 @@ install_ubuntu()
return 1
fi
- arch=$(arch)
- if [ "$arch" == "x86_64" ]; then
- arch=amd64
- fi
-
- if [ "$arch" == "i686" ]; then
- arch=i386
- fi
+ arch=$(dpkg --print-architecture)
echo "Checking cache download in $cache/rootfs-$arch ... "
if [ ! -e "$cache/rootfs-$arch" ]; then
diff --git a/templates/lxc-natty.in b/templates/lxc-natty.in
index e7e3859..8211c1e 100644
--- a/templates/lxc-natty.in
+++ b/templates/lxc-natty.in
@@ -118,14 +118,7 @@ install_ubuntu()
return 1
fi
- arch=$(arch)
- if [ "$arch" == "x86_64" ]; then
- arch=amd64
- fi
-
- if [ "$arch" == "i686" ]; then
- arch=i386
- fi
+ arch=$(dpkg --print-architecture)
echo "Checking cache download in $cache/rootfs-$arch ... "
if [ ! -e "$cache/rootfs-$arch" ]; then
--
1.7.5.1
More information about the lxc-devel
mailing list