mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-12 08:40:24 +00:00
Add a friendlier message if tftp service is running
The socket activation may fail due to tftp already running.
This commit is contained in:
parent
ffe0144b2c
commit
6ab57b8669
@ -160,7 +160,11 @@ def install_tftp_content():
|
||||
emprint('Unable to detect a directory for tftp content (check that tftp server is installed)')
|
||||
return 1
|
||||
if os.path.exists('/usr/lib/systemd/system/tftp.socket'):
|
||||
subprocess.check_call(['systemctl', 'enable', 'tftp.socket', '--now'])
|
||||
try:
|
||||
subprocess.check_call(['systemctl', 'enable', 'tftp.socket', '--now'])
|
||||
print('Ensured that tftp servicec is enabled')
|
||||
except Exception:
|
||||
emprint('Unable to automatically enable and start tftp.socket, tftp server may already be running outside of systemd control')
|
||||
else:
|
||||
emprint(
|
||||
'Detected {0} as tftp directory, but unable to determine tftp service, ensure that a tftp server is installed and enabled manually'.format(tftplocation))
|
||||
|
Loading…
x
Reference in New Issue
Block a user