From 77cfa7b45c8097a3d528d7fb0dc3d1a472a43774 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 15 Jul 2020 10:59:30 -0400 Subject: [PATCH] Revise tftp initialization For one, if the xCAT /tftpboot is present, roll with that. For another, use a symlink to /opt instead of copy, to make upgrades easier. --- confluent_server/bin/osdeploy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/confluent_server/bin/osdeploy b/confluent_server/bin/osdeploy index efd60eef..47e97b64 100644 --- a/confluent_server/bin/osdeploy +++ b/confluent_server/bin/osdeploy @@ -50,7 +50,7 @@ def main(args): def install_tftp_content(): tftplocation = None - candidates = ('/var/lib/tftpboot', '/srv/tftpboot', '/srv/tftp') + candidates = ('/tftpboot', '/var/lib/tftpboot', '/srv/tftpboot', '/srv/tftp') for cand in candidates: if os.path.isdir(cand): tftplocation = cand @@ -63,8 +63,8 @@ def install_tftp_content(): except OSError as e: if e.errno == 17: raise - shutil.copy('/opt/confluent/lib/ipxe/ipxe.efi', tftplocation) - shutil.copy('/opt/confluent/lib/ipxe/ipxe.kkpxe', tftplocation) + os.symlink('/opt/confluent/lib/ipxe/ipxe.efi', tftplocation + '/ipxe.efi') + os.symlink('/opt/confluent/lib/ipxe/ipxe.kkpxe', tftplocation + '/ipxe.kkpxe') def initialize(cmdset): @@ -202,4 +202,4 @@ def osimport(imagefile): list(c.delete('/deployment/importing/{0}'.format(shortname))) if __name__ == '__main__': - main(sys.argv) \ No newline at end of file + main(sys.argv)