Commit ed4616b1 by Christian Bühler Committed by Stéphane Graber

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: 's avatarChristian Bühler <christian@cbuehler.de> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 6c5db2af
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#Configurations #Configurations
arch=$(arch) arch=$(uname -m)
cache_base=@LOCALSTATEDIR@/cache/lxc/altlinux/$arch cache_base=@LOCALSTATEDIR@/cache/lxc/altlinux/$arch
default_path=@LXCPATH@ default_path=@LXCPATH@
default_profile=default default_profile=default
......
...@@ -175,7 +175,7 @@ install_debian() ...@@ -175,7 +175,7 @@ install_debian()
if which dpkg >/dev/null 2>&1 ; then if which dpkg >/dev/null 2>&1 ; then
arch=$(dpkg --print-architecture) arch=$(dpkg --print-architecture)
else else
arch=$(arch) arch=$(uname -m)
if [ "$arch" = "i686" ]; then if [ "$arch" = "i686" ]; then
arch="i386" arch="i386"
elif [ "$arch" = "x86_64" ]; then elif [ "$arch" = "x86_64" ]; then
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#Configurations #Configurations
arch=$(arch) arch=$(uname -m)
cache_base=@LOCALSTATEDIR@/cache/lxc/fedora/$arch cache_base=@LOCALSTATEDIR@/cache/lxc/fedora/$arch
default_path=@LXCPATH@ default_path=@LXCPATH@
root_password=root root_password=root
......
...@@ -212,7 +212,7 @@ install_opensuse() ...@@ -212,7 +212,7 @@ install_opensuse()
return 1 return 1
fi fi
arch=$(arch) arch=$(uname -m)
echo "Checking cache download in $cache/rootfs-$arch ... " echo "Checking cache download in $cache/rootfs-$arch ... "
if [ ! -e "$cache/rootfs-$arch" ]; then if [ ! -e "$cache/rootfs-$arch" ]; then
......
...@@ -615,7 +615,7 @@ if [ $? -ne 0 ]; then ...@@ -615,7 +615,7 @@ if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
arch=$(arch) arch=$(uname -m)
eval set -- "$options" eval set -- "$options"
while true while true
do do
......
...@@ -148,7 +148,7 @@ if [ -f /etc/lsb-release ]; then ...@@ -148,7 +148,7 @@ if [ -f /etc/lsb-release ]; then
esac esac
fi fi
arch=$(arch) arch=$(uname -m)
# Code taken from debootstrap # Code taken from debootstrap
if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then 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 ...@@ -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 elif type udpkg >/dev/null 2>&1 && udpkg --print-architecture >/dev/null 2>&1; then
arch=`/usr/bin/udpkg --print-architecture` arch=`/usr/bin/udpkg --print-architecture`
else else
arch=$(arch) arch=$(uname -m)
if [ "$arch" = "i686" ]; then if [ "$arch" = "i686" ]; then
arch="i386" arch="i386"
elif [ "$arch" = "x86_64" ]; then elif [ "$arch" = "x86_64" ]; then
......
...@@ -605,7 +605,7 @@ if [ -f /etc/lsb-release ]; then ...@@ -605,7 +605,7 @@ if [ -f /etc/lsb-release ]; then
fi fi
bindhome= bindhome=
arch=$(arch) arch=$(uname -m)
# Code taken from debootstrap # Code taken from debootstrap
if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then 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 ...@@ -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 elif which udpkg >/dev/null 2>&1 && udpkg --print-architecture >/dev/null 2>&1; then
arch=`/usr/bin/udpkg --print-architecture` arch=`/usr/bin/udpkg --print-architecture`
else else
arch=$(arch) arch=$(uname -m)
if [ "$arch" = "i686" ]; then if [ "$arch" = "i686" ]; then
arch="i386" arch="i386"
elif [ "$arch" = "x86_64" ]; then elif [ "$arch" = "x86_64" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment