mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Merge pull request #2004 from pi-hole/tweak/32bitOS_on_64bitCPU
Install 32bit FTL on 32bit OS (even if 64bit architecture is detected)
This commit is contained in:
commit
c8bcd4af2d
1 changed files with 16 additions and 6 deletions
|
@ -2094,9 +2094,8 @@ FTLinstall() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_binary_name() {
|
get_binary_name() {
|
||||||
# Local, named variables
|
# This gives the machine architecture which may be different from the OS architecture...
|
||||||
local machine
|
local machine
|
||||||
# Store architecture in a variable
|
|
||||||
machine=$(uname -m)
|
machine=$(uname -m)
|
||||||
|
|
||||||
local str="Detecting architecture"
|
local str="Detecting architecture"
|
||||||
|
@ -2139,10 +2138,21 @@ get_binary_name() {
|
||||||
# set the binary to be used
|
# set the binary to be used
|
||||||
binary="pihole-FTL-powerpc-linux-gnu"
|
binary="pihole-FTL-powerpc-linux-gnu"
|
||||||
elif [[ "${machine}" == "x86_64" ]]; then
|
elif [[ "${machine}" == "x86_64" ]]; then
|
||||||
# 64bit
|
# This gives the architecture of packages dpkg installs (for example, "i386")
|
||||||
echo -e "${OVER} ${TICK} Detected x86_64 architecture"
|
local dpkgarch
|
||||||
# set the binary to be used
|
dpkgarch=$(dpkg --print-architecture 2> /dev/null)
|
||||||
binary="pihole-FTL-linux-x86_64"
|
|
||||||
|
# Special case: This is a 32 bit OS, installed on a 64 bit machine
|
||||||
|
# -> change machine architecture to download the 32 bit executable
|
||||||
|
if [[ "${dpkgarch}" == "i386" ]]; then
|
||||||
|
echo -e "${OVER} ${TICK} Detected 32bit (i686) architecture"
|
||||||
|
binary="pihole-FTL-linux-x86_32"
|
||||||
|
else
|
||||||
|
# 64bit
|
||||||
|
echo -e "${OVER} ${TICK} Detected x86_64 architecture"
|
||||||
|
# set the binary to be used
|
||||||
|
binary="pihole-FTL-linux-x86_64"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# Something else - we try to use 32bit executable and warn the user
|
# Something else - we try to use 32bit executable and warn the user
|
||||||
if [[ ! "${machine}" == "i686" ]]; then
|
if [[ ! "${machine}" == "i686" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue