From f10bbdc33d92a92b98adafbcda3b577e9d19ab52 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 7 May 2020 11:57:52 -0400 Subject: [PATCH] Fix ubuntu missing osprofile osprofile argument needed to find path to install image. --- confluent_osdeploy/ubuntu20.04/profiles/default/profile.yaml | 2 +- librarian/osimport | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/profile.yaml b/confluent_osdeploy/ubuntu20.04/profiles/default/profile.yaml index a582ad16..f96cd233 100644 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/profile.yaml +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/profile.yaml @@ -1,2 +1,2 @@ label: %%DISTRO%% %%VERSION%% %%ARCH%% (Default Profile) -kernelargs: quiet +kernelargs: quiet osprofile=%%PROFILE%% diff --git a/librarian/osimport b/librarian/osimport index a7557245..6738c07c 100644 --- a/librarian/osimport +++ b/librarian/osimport @@ -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 \ No newline at end of file