]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Use "uname -m" instead of "arch"
authorChristian Bühler <christian@cbuehler.de>
Sat, 20 Apr 2013 13:50:13 +0000 (15:50 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Sun, 21 Apr 2013 18:23:40 +0000 (20:23 +0200)
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 <christian@cbuehler.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-altlinux.in
templates/lxc-debian.in
templates/lxc-fedora.in
templates/lxc-opensuse.in
templates/lxc-oracle.in
templates/lxc-ubuntu-cloud.in
templates/lxc-ubuntu.in

index fac545cc32c076a0a2717ad19842e98ac54dfdcd..da66ae78c189f98508e13acb59a8885b5175b9de 100644 (file)
@@ -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
index e36523c26a8649c09631983117138dc09016c4a9..568bc2cfba2ad5885c494e136cf707f41215bf37 100644 (file)
@@ -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
index 684bb9cca23bc74d8f860385c20c858afb7d292f..6f31e997ecaf90216a2aa3b2c069eabb13c05244 100644 (file)
@@ -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
index 77ef6b20e41261c559fd5a6f98ef288ee1439a7d..af92cf5d1be25cffaf86aa709edfca9288308f8a 100644 (file)
@@ -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
index 16a622e13925352021a0218026a75121fab5c6c9..946956d1ced92b4e7dc6e8f640505df13a3e64fd 100644 (file)
@@ -615,7 +615,7 @@ if [ $? -ne 0 ]; then
     exit 1
 fi
 
-arch=$(arch)
+arch=$(uname -m)
 eval set -- "$options"
 while true
 do
index 8673e4cbb824953283c61c489b21c6b961d64974..22bce1f2779a4854cd09a7622ffbef4614de1000 100644 (file)
@@ -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
index db38af063277bfd01ca97e4345fbfbd01daa9fe8..8c6593b15ab4499b9b22d59e70e5f4edf39dee14 100644 (file)
@@ -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