2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Relocate boot.ipxe

It looks a bit weird in the linux and outright bizarre
in the vmware case.
This commit is contained in:
Jarrod Johnson 2020-06-11 15:28:45 -04:00
parent 0849f20d60
commit 68f000838e
2 changed files with 5 additions and 5 deletions

View File

@ -269,7 +269,7 @@ def proxydhcp():
if not profile:
continue
myip = socket.inet_ntoa(myipn)
bootfile = 'http://{0}/confluent-public/os/{1}/boot/boot.ipxe'.format(myip, profile).encode('utf8')
bootfile = 'http://{0}/confluent-public/os/{1}/boot.ipxe'.format(myip, profile).encode('utf8')
elif disco['arch'] == 'uefi-x64':
bootfile = b'confluent/x86_64/ipxe.efi'
elif disco['arch'] == 'bios-x86':
@ -594,4 +594,4 @@ def consider_discover(info, packet, sock, cfg, reqview):
if __name__ == '__main__':
def testsnoop(info):
print(repr(info))
snoop(testsnoop)
snoop(testsnoop)

View File

@ -114,14 +114,14 @@ def update_boot_linux(profiledir, profile, label):
for initramfs in initrds:
ipxeargs += " initrd=" + initramfs
oum = os.umask(0o22)
ipout = os.open(profiledir + '/boot/boot.ipxe', os.O_WRONLY|os.O_CREAT, 0o644)
ipout = os.open(profiledir + '/boot.ipxe', os.O_WRONLY|os.O_CREAT, 0o644)
ipxeout = os.fdopen(ipout, 'w')
try:
os.umask(oum)
ipxeout.write('#!ipxe\n')
ipxeout.write('imgfetch kernel ' + ipxeargs + '\n')
ipxeout.write('imgfetch boot/kernel ' + ipxeargs + '\n')
for initramfs in initrds:
ipxeout.write('imgfetch initramfs/{0}\n'.format(initramfs))
ipxeout.write('imgfetch boot/initramfs/{0}\n'.format(initramfs))
ipxeout.write('imgload kernel\nimgexec kernel\n')
finally:
ipxeout.close()