Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36626 - safe checks for the pxe_loader #9993

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ clearpart --all --initlabel
lvname_swap = host_param('part_swap_name') || 'lv_swap'
lvname_root = host_param('part_root_name') || 'lv_root'
lvname_home = host_param('part_home_name') || 'lv_home'
pxe_loader = @host.pxe_loader || ''
ShimShtein marked this conversation as resolved.
Show resolved Hide resolved
-%>

<% if @host.pxe_loader.include?('UEFI') || @host.pxe_loader.include?('BIOS') -%>
<%- if @host.pxe_loader.include?('UEFI') -%>
<% if pxe_loader.include?('UEFI') || pxe_loader.include?('BIOS') -%>
<%- if pxe_loader.include?('UEFI') -%>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should be@host.pxe_loader_efi? (and modify that to handle nil values for pxe_loader.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that something we decided not to do in https://github.com/theforeman/foreman/pull/9785/files?
I'm for having it explicitly in the template, so users know what's going on.

part /boot/efi --fstype="efi" --ondisk=<%= dev %> --size=200 --fsoptions="umask=0077,shortname=efi"
<%- end -%>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require:
options << 'console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us localechooser/translation/warn-light=true localechooser/translation/warn-severe=true'
options << "locale=#{host_param('lang') || 'en_US'}"
extra = []
extra << "--kexec-file-syscall" if @host.pxe_loader.include?('SecureBoot')
extra << "--kexec-file-syscall" if @host.pxe_loader&.include?('SecureBoot')
-%>
{
"kernel": "<%= @kernel_uri %>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require:
options.push('fips=1')
end
extra = []
extra << "--kexec-file-syscall" if @host.pxe_loader.include?('SecureBoot')
extra << "--kexec-file-syscall" if @host.pxe_loader&.include?('SecureBoot')
-%>
{
"kernel": "<%= @kernel_uri %>",
Expand Down
Loading