Skip to content
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
16 changes: 8 additions & 8 deletions confluent_server/bin/osdeploy
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand All @@ -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]
Expand Down
14 changes: 12 additions & 2 deletions ipxe/confluent_ipxe.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: confluent_ipxe
Version: 2.0.0
Release: 1
Release: 2
Summary: iPXE network boot roms for confluent

License: GPL
Expand Down Expand Up @@ -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
Expand Down
Loading