From d4dbb9f2984902265d9dfeb3668f95c78843448e Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Wed, 13 Sep 2023 18:16:25 +0200 Subject: [PATCH] Fixes #36741 - Check Ubuntu version more explicitly If no minor version is defined, the function minor.to_i makes it a "0". Accordingly, Ubuntu 20.04 is interpreted as "no subiquity/Autoinstall" - but, if no minor version is given, Foreman should implicitly assume "latest" (which supports Autoinstall in fact). --- app/models/operatingsystems/debian.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/operatingsystems/debian.rb b/app/models/operatingsystems/debian.rb index efa6733c3f4..705b3ec7e58 100644 --- a/app/models/operatingsystems/debian.rb +++ b/app/models/operatingsystems/debian.rb @@ -81,7 +81,7 @@ def guess_os def is_subiquity? return false if guess_os != "ubuntu" return false if major.to_i < 20 - return false if major.to_i == 20 && minor.to_i <= 2 + return false if major.to_i == 20 && minor.present? && minor.to_i <= 2 true # Ubuntu release 20.04.3 or newer end