mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Detect if architecture is *aarch* + use hf binary only if ARMv7+ is detected
This commit is contained in:
parent
378338c684
commit
f24f77c5bd
1 changed files with 10 additions and 5 deletions
|
@ -1163,16 +1163,21 @@ FTLdownload() {
|
||||||
|
|
||||||
local machine=$(uname -m)
|
local machine=$(uname -m)
|
||||||
|
|
||||||
echo $machine
|
if [[ $machine == arm* || $machine == *aarch* ]]; then
|
||||||
|
|
||||||
if [[ $machine == arm* ]]; then
|
|
||||||
# ARM
|
# ARM
|
||||||
|
local rev=$(uname -m | sed "s/[^0-9]//g;")
|
||||||
if [ -f "/lib/ld-linux-aarch64.so.1" ]; then
|
if [ -f "/lib/ld-linux-aarch64.so.1" ]; then
|
||||||
echo "::: Detected ARM-aarch64 architecture"
|
echo "::: Detected ARM-aarch64 architecture"
|
||||||
binary="pihole-FTL-aarch64-linux-gnu"
|
binary="pihole-FTL-aarch64-linux-gnu"
|
||||||
elif [ -f "/lib/ld-linux-armhf.so.3" ]; then
|
elif [ -f "/lib/ld-linux-armhf.so.3" ]; then
|
||||||
echo "::: Detected ARM-hf architecture"
|
if [ "$rev" -gt "6" ]; then
|
||||||
binary="pihole-FTL-arm-linux-gnueabihf"
|
echo "::: Detected ARM-hf architecture (armv7+)"
|
||||||
|
binary="pihole-FTL-arm-linux-gnueabihf"
|
||||||
|
else
|
||||||
|
echo "::: Detected ARM-hf architecture (armv6 or lower)"
|
||||||
|
echo "::: Using ARM binary"
|
||||||
|
binary="pihole-FTL-arm-linux-gnueabi"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "::: Detected ARM architecture"
|
echo "::: Detected ARM architecture"
|
||||||
binary="pihole-FTL-arm-linux-gnueabi"
|
binary="pihole-FTL-arm-linux-gnueabi"
|
||||||
|
|
Loading…
Reference in a new issue