mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-26 06:40:17 +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:
parent
f14184df30
commit
0541d8f1c5
1 changed files with 11 additions and 0 deletions
|
@ -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}..."
|
||||
|
|
Loading…
Reference in a new issue