1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Try to determine if the user is running a 32bit OS on a 64bit system. If so, download the 32bit binary as we cannot expect the 64bit libraries to be present.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2018-02-24 11:13:33 +01:00
parent f14184df30
commit 0541d8f1c5
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -68,9 +68,20 @@ FTLinstall() {
}
get_binary_name() {
# This gives the machine architecture which may be different from the OS architecture...
local machine
machine=$(uname -m)
# This gives the architecture of packages dpkg installs (for example, "i386")
local dpkgarch
dpkgarch=$(dpkg --print-architecture 2> /dev/null)
# Special case: This is a 32 bit OS, installed on a 64 bit machine
# -> change machine architecture to download the 32 bit executable
if [[ "${machine}" == "x86_64" && "${dpkgarch}" == "i386" ]]; then
machine="i686"
fi
local str
str="Detecting architecture"
echo -ne " ${INFO} ${str}..."