From: Christian Bühler Date: Sat, 20 Apr 2013 13:50:13 +0000 (+0200) Subject: Use "uname -m" instead of "arch" X-Git-Tag: lxc-1.0.0.alpha1~1^2~280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed4616b1cfbc84dd01caa8546d813e8c5d482921;p=thirdparty%2Flxc.git Use "uname -m" instead of "arch" According to "arch"'s manpage, it's identical to "uname -m". Some distros ship uname but don't ship arch, however all distros ship uname, therefore it makes sense to use "uname -m" whenever possible. Signed-off-by: Christian Bühler Acked-by: Stéphane Graber --- diff --git a/templates/lxc-altlinux.in b/templates/lxc-altlinux.in index fac545cc3..da66ae78c 100644 --- a/templates/lxc-altlinux.in +++ b/templates/lxc-altlinux.in @@ -25,7 +25,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #Configurations -arch=$(arch) +arch=$(uname -m) cache_base=@LOCALSTATEDIR@/cache/lxc/altlinux/$arch default_path=@LXCPATH@ default_profile=default diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index e36523c26..568bc2cfb 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -175,7 +175,7 @@ install_debian() if which dpkg >/dev/null 2>&1 ; then arch=$(dpkg --print-architecture) else - arch=$(arch) + arch=$(uname -m) if [ "$arch" = "i686" ]; then arch="i386" elif [ "$arch" = "x86_64" ]; then diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in index 684bb9cca..6f31e997e 100644 --- a/templates/lxc-fedora.in +++ b/templates/lxc-fedora.in @@ -26,7 +26,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #Configurations -arch=$(arch) +arch=$(uname -m) cache_base=@LOCALSTATEDIR@/cache/lxc/fedora/$arch default_path=@LXCPATH@ root_password=root diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in index 77ef6b20e..af92cf5d1 100644 --- a/templates/lxc-opensuse.in +++ b/templates/lxc-opensuse.in @@ -212,7 +212,7 @@ install_opensuse() return 1 fi - arch=$(arch) + arch=$(uname -m) echo "Checking cache download in $cache/rootfs-$arch ... " if [ ! -e "$cache/rootfs-$arch" ]; then diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 16a622e13..946956d1c 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -615,7 +615,7 @@ if [ $? -ne 0 ]; then exit 1 fi -arch=$(arch) +arch=$(uname -m) eval set -- "$options" while true do diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in index 8673e4cbb..22bce1f27 100644 --- a/templates/lxc-ubuntu-cloud.in +++ b/templates/lxc-ubuntu-cloud.in @@ -148,7 +148,7 @@ if [ -f /etc/lsb-release ]; then esac fi -arch=$(arch) +arch=$(uname -m) # Code taken from debootstrap if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then @@ -156,7 +156,7 @@ if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; t elif type udpkg >/dev/null 2>&1 && udpkg --print-architecture >/dev/null 2>&1; then arch=`/usr/bin/udpkg --print-architecture` else - arch=$(arch) + arch=$(uname -m) if [ "$arch" = "i686" ]; then arch="i386" elif [ "$arch" = "x86_64" ]; then diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in index db38af063..8c6593b15 100644 --- a/templates/lxc-ubuntu.in +++ b/templates/lxc-ubuntu.in @@ -605,7 +605,7 @@ if [ -f /etc/lsb-release ]; then fi bindhome= -arch=$(arch) +arch=$(uname -m) # Code taken from debootstrap if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then @@ -613,7 +613,7 @@ if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; t elif which udpkg >/dev/null 2>&1 && udpkg --print-architecture >/dev/null 2>&1; then arch=`/usr/bin/udpkg --print-architecture` else - arch=$(arch) + arch=$(uname -m) if [ "$arch" = "i686" ]; then arch="i386" elif [ "$arch" = "x86_64" ]; then