arch is not portable.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-02-21 09:14:49 -08:00
parent a64211123f
commit 4dcee5cd84
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -1199,11 +1199,11 @@ FTLdetect() {
local machine local machine
local binary local binary
machine=$(arch) machine=$(uname -m)
if [[ $machine == arm* || $machine == *aarch* ]]; then if [[ $machine == arm* || $machine == *aarch* ]]; then
# ARM # ARM
local rev=$(arch | sed "s/[^0-9]//g;") local rev=$(uname -m | sed "s/[^0-9]//g;")
local lib=$(ldd /bin/ls | grep -E '^\s*/lib' | awk '{ print $1 }') local lib=$(ldd /bin/ls | grep -E '^\s*/lib' | awk '{ print $1 }')
if [[ "$lib" == "/lib/ld-linux-aarch64.so.1" ]]; then if [[ "$lib" == "/lib/ld-linux-aarch64.so.1" ]]; then
echo "::: Detected ARM-aarch64 architecture" echo "::: Detected ARM-aarch64 architecture"