fix: correct syntax error when detecting old ubuntu releases

This commit is contained in:
Martin Wimpress 2024-04-19 15:02:32 +01:00 committed by Martin Wimpress
parent 9665a11e21
commit 62064c0c13
1 changed files with 6 additions and 3 deletions

View File

@ -1601,9 +1601,12 @@ function make_vm_config() {
ubuntu*)
GUEST="linux"
IMAGE_TYPE="iso"
local SHORT_RELEASE="$(echo "${RELEASE}" | sed s'/\.//g')"
if [ ${SHORT_RELEASE} -lt 1604 ]; then
GUEST="linux_old"
# If there is a point in the release, check if it is less than 16.04
if [[ "${RELEASE}" == "*.*" ]]; then
local SHORT_RELEASE=${RELEASE//./}
if [ "${SHORT_RELEASE}" -lt 1604 ]; then
GUEST="linux_old"
fi
fi
;;
windows)