From 284dd79af5cc98b154fd08cace2fdeb2ba064582 Mon Sep 17 00:00:00 2001 From: Stephen Benjamin Date: Wed, 22 Aug 2018 10:13:42 -0400 Subject: [PATCH] fixes #24690 - add symlink grub2/boot to ../boot --- manifests/tftp/netboot.pp | 6 ++++++ spec/classes/foreman_proxy__tftp__netboot_spec.rb | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/manifests/tftp/netboot.pp b/manifests/tftp/netboot.pp index 5074a14e..d52b1fde 100644 --- a/manifests/tftp/netboot.pp +++ b/manifests/tftp/netboot.pp @@ -7,6 +7,12 @@ ) inherits foreman_proxy::tftp::netboot::params { ensure_packages($packages, { ensure => 'present', }) + # The symlink from grub2/boot to boot is needed for UEFI HTTP boot + file {"${root}/grub2/boot": + ensure => 'link', + target => '../boot', + } + case $grub_installation_type { 'redhat_exec': { $efi_lib_dir = '/usr/lib/grub/x86_64-efi' diff --git a/spec/classes/foreman_proxy__tftp__netboot_spec.rb b/spec/classes/foreman_proxy__tftp__netboot_spec.rb index feb21da9..659bd532 100644 --- a/spec/classes/foreman_proxy__tftp__netboot_spec.rb +++ b/spec/classes/foreman_proxy__tftp__netboot_spec.rb @@ -12,6 +12,11 @@ end it { is_expected.to compile.with_all_deps } + + it 'should create grub2 boot symlink' do + should contain_file("/tftproot/grub2/boot"). + with_ensure('link').with_target("../boot") + end end end end