From 6c2b0a87e0df53fcba08f8576e5ceffa0b8bc940 Mon Sep 17 00:00:00 2001 From: Markus Reisner Date: Wed, 22 Nov 2023 20:53:31 +0100 Subject: [PATCH] Refs #36834 - New PXE loader "Grub2 UEFI SecureBoot (target OS)" --- app/models/concerns/orchestration/tftp.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/concerns/orchestration/tftp.rb b/app/models/concerns/orchestration/tftp.rb index 41eea436046f..349a7fcc5d6a 100644 --- a/app/models/concerns/orchestration/tftp.rb +++ b/app/models/concerns/orchestration/tftp.rb @@ -137,7 +137,7 @@ def validate_tftp return unless tftp? || tftp6? return unless host.operatingsystem pxe_kind = host.operatingsystem.pxe_loader_kind(host) - if pxe_kind.to_s == "PXEGrub2TargetOS" + if isPXEGrub2TargetOS(pxe_kind) pxe_kind = "PXEGrub2".to_sym end if pxe_kind && host.provisioning_template({:kind => pxe_kind}).nil? @@ -156,7 +156,7 @@ def queue_tftp def queue_tftp_create pxe_kind = host.operatingsystem.pxe_loader_kind(host) host.operatingsystem.template_kinds.each do |kind| - if kind.to_s == "PXEGrub2" && pxe_kind.to_s == "PXEGrub2TargetOS" + if kind.to_s == "PXEGrub2" && isPXEGrub2TargetOS(pxe_kind) queue.create(:name => _("Deploy TFTP SecureBoot %{kind} config for %{host}") % {:kind => kind, :host => self}, :priority => 20, :action => [self, :setTFTP, pxe_kind]) end queue.create(:name => _("Deploy TFTP %{kind} config for %{host}") % {:kind => kind, :host => self}, :priority => 20, :action => [self, :setTFTP, kind])