Vars refactor: Replace allcores with CORES_HOST

This commit is contained in:
Martin Wimpress 2020-03-21 10:45:27 +00:00
parent bd987f55d2
commit 62b6286564
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3

View File

@ -191,10 +191,10 @@ function vm_boot() {
fi
local cores="1"
local allcores=$(nproc --all)
if [ ${allcores} -ge 8 ]; then
local CORES_HOST=$(nproc --all)
if [ ${CORES_HOST} -ge 8 ]; then
cores="4"
elif [ ${allcores} -ge 4 ]; then
elif [ ${CORES_HOST} -ge 4 ]; then
cores="2"
fi
echo " - CPU: ${cores} Core(s)"