From d204eedb7664b83c43df8ba96e1ffbf5a807be3a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 30 Jul 2020 13:57:42 -0400 Subject: [PATCH] Have osdeploy -p enable tftp This makes the procedure shorter. --- confluent_server/bin/osdeploy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/confluent_server/bin/osdeploy b/confluent_server/bin/osdeploy index d08a19b2..94f41b4d 100644 --- a/confluent_server/bin/osdeploy +++ b/confluent_server/bin/osdeploy @@ -56,7 +56,12 @@ def install_tftp_content(): tftplocation = cand break if not tftplocation: - raise Exception('Unable to detect an installed tftp location') + raise Exception('Unable to detect an installed tftp location (check that tftp server is installed)') + if os.path.exists('/usr/lib/systemd/system/tftp.socket'): + subprocess.check_call(['systemctl', 'enable', 'tftp.socket', '--now']) + else: + print( + 'Unable to automatically enable TFTP server, please enable manually') tftplocation = '{0}/confluent/x86_64'.format(tftplocation) try: os.makedirs(tftplocation)