Move to template format instead of cat-EOF

Simplifies the scripts and adds the ability to easily and cleanly change
the contents of these files without dealing with escape characters, etc.
This commit is contained in:
2023-09-01 15:41:57 -04:00
parent cf42c366e0
commit c8f1d853a0
22 changed files with 1018 additions and 924 deletions

24
templates/boot.pxe Normal file
View File

@ -0,0 +1,24 @@
#!ipxe
# Set global variables
set root-url tftp://${next-server}
set kernel vmlinuz
set initrd initrd.img
# Set kernel command line parameters
set imgargs-base vga=normal nomodeset boot=live components ethdevice-timeout=600 timezone=America/Toronto fetch=${root-url}/filesystem.squashfs username=root
set imgargs-pvcinstall pvcinstall.preseed=on pvcinstall.seed_host=${next-server} pvcinstall.seed_file=/host/mac-${mac:hexraw}.preseed
# Load per-host kernel command line parameters (should contain ${imgargs-host} if present)
chain --autofree ${root-url}/host/mac-${mac:hexraw}.ipxe ||
# Set default menu options
set menu-default pvc-installer
set submenu-default pvc-installer
# PVC installer menu option
:pvc-installer
kernel ${root-url}/vmlinuz
initrd ${root-url}/initrd.img
imgargs vmlinuz ${imgargs-host} ${imgargs-base} ${imgargs-pvcinstall}
boot