diff --git a/README.md b/README.md index e145c22..ba473a1 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ of GNU/Linux distributions. The needed executables in the host OS are: - mkdir - rm - tar +- uname - wget or curl The minimum recommended linux kernel is 2.6.0+ diff --git a/lib/core.sh b/lib/core.sh index 9cafbb3..954b93a 100644 --- a/lib/core.sh +++ b/lib/core.sh @@ -52,8 +52,16 @@ then JUNEST_TEMPDIR=/tmp fi +# The update of the variable PATH ensures that the executables are +# found on different locations +PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH + +# The executable uname is essential in order to get the architecture +# of the host system, so a fallback mechanism cannot be used for it. +UNAME=uname + ARCH_LIST=('x86_64' 'x86' 'arm') -HOST_ARCH=$(uname -m) +HOST_ARCH=$($UNAME -m) if [ $HOST_ARCH == "i686" ] || [ $HOST_ARCH == "i386" ] then ARCH="x86" @@ -94,7 +102,6 @@ CURL="curl -L -J -O -k" TAR=tar CHOWN="chown" -PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH LD_EXEC="$LD_LIB --library-path ${JUNEST_HOME}/usr/lib:${JUNEST_HOME}/lib" # The following functions attempt first to run the executable in the host OS.