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

Fix ubuntu missing osprofile

osprofile argument needed to
find path to install image.
This commit is contained in:
Jarrod Johnson 2020-05-07 11:57:52 -04:00
parent d6df9db229
commit f10bbdc33d
2 changed files with 5 additions and 2 deletions

View File

@ -1,2 +1,2 @@
label: %%DISTRO%% %%VERSION%% %%ARCH%% (Default Profile)
kernelargs: quiet
kernelargs: quiet osprofile=%%PROFILE%%

View File

@ -55,7 +55,7 @@ def update_boot(profiledir):
initrds.append(initramfs)
grubcfg += " initrdefi "
for initramfs in initrds:
grubcfg += "initramfs/{0}".format(initramfs)
grubcfg += " /initramfs/{0}".format(initramfs)
grubcfg += "\n}\n"
with open(profiledir + '/boot/efi/boot/grub.cfg', 'w') as grubout:
grubout.write(grubcfg)
@ -368,6 +368,7 @@ class MediaImporter(object):
profdata = profdata.replace('%%DISTRO%%', osd)
profdata = profdata.replace('%%VERSION%%', osversion)
profdata = profdata.replace('%%ARCH%%', arch)
profdata = profdata.replacey('%%PROFILE%%', profname)
if profdata:
with open('{0}/profile.yaml'.format(dirname), 'w') as yout:
yout.write(profdata)
@ -377,6 +378,7 @@ class MediaImporter(object):
os.symlink(
'/var/lib/confluent/public/site/initramfs.cpio',
'{0}/boot/initramfs/site.cpio'.format(dirname))
os.symlink(self.targpath, '{0}/distribution'.format(dirname))
subprocess.check_call(
['sh', '{0}/initprofile.sh'.format(dirname),
self.targpath, dirname])
@ -391,3 +393,4 @@ if __name__ == '__main__':
sys.exit(import_image(sys.argv[1], callback=printit, backend=True))
else:
sys.exit(import_image(sys.argv[1], callback=printit))
F