2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-19 08:52:20 +00:00

Merge pull request #394 from Obihoernchen/fix/ipxe-shim-refresh

Fix ipxe shim refresh
This commit is contained in:
Jarrod Johnson
2026-11-18 16:06:08 -05:00
committed by GitHub
2 changed files with 20 additions and 10 deletions
+8 -8
View File
@@ -423,6 +423,14 @@ async def initialize(cmdset):
initialize_genesis('aarch64')
if cmdset.r:
didsomething = True
if not os.path.exists('/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-shim.efi'):
os.makedirs('/var/lib/confluent/public/ipxe/x86_64', exist_ok=True)
shutil.copy('/opt/confluent/lib/ipxe/ipxe-shim.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi')
shutil.copy('/opt/confluent/lib/ipxe/ipxe.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe.efi')
if not os.path.exists('/var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi'):
os.makedirs('/var/lib/confluent/public/ipxe/aarch64', exist_ok=True)
shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi')
shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe.efi')
if not didsomething and (cmdset.k or cmdset.l or cmdset.g or cmdset.p):
if cmdset.g:
if os.path.exists('/var/lib/confluent/public/os/genesis-x86_64'):
@@ -434,14 +442,6 @@ async def initialize(cmdset):
sys.stderr.write('Nothing was done, use initialize -i for '
'interactive mode, or see initialize -h for more options\n')
sys.exit(1)
if not os.path.exists('/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-shim.efi'):
os.makedirs('/var/lib/confluent/public/ipxe/x86_64', exist_ok=True)
shutil.copy('/opt/confluent/lib/ipxe/ipxe-shim.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi')
shutil.copy('/opt/confluent/lib/ipxe/ipxe.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe.efi')
if not os.path.exists('/var/lib/confluent/public/ipxe/aarch64/ipxe-aarch64-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi'):
os.makedirs('/var/lib/confluent/public/ipxe/aarch64', exist_ok=True)
shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi')
shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe.efi')
tmpname = '/var/lib/confluent/public/site/initramfs.cpio.'
for x in bytearray(os.urandom(22)):
tmpname += fnamechars[x >> 2]
+12 -2
View File
@@ -1,6 +1,6 @@
Name: confluent_ipxe
Version: 2.0.0
Release: 1
Release: 2
Summary: iPXE network boot roms for confluent
License: GPL
@@ -32,7 +32,17 @@ cp arm64-sb/snponly.efi %{buildroot}/opt/confluent/lib/ipxe/ipxe-aarch64.efi
/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi
/opt/confluent/lib/ipxe/ipxe-aarch64.efi
%post
# UEFI HTTP boot chainloads the shim from the public tree. A fresh install
# leaves it to osdeploy initialize, so public keeps the ownership the
# server gives it.
if [ -d /var/lib/confluent/public ]; then
mkdir -p /var/lib/confluent/public/ipxe/x86_64 /var/lib/confluent/public/ipxe/aarch64
cp /opt/confluent/lib/ipxe/ipxe-shim.efi /opt/confluent/lib/ipxe/ipxe.efi /var/lib/confluent/public/ipxe/x86_64/
cp /opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi /var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi
cp /opt/confluent/lib/ipxe/ipxe-aarch64.efi /var/lib/confluent/public/ipxe/aarch64/ipxe.efi
fi
true
%changelog