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}..."