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

Amend local osdeploy initialize behavior

Do not bother the site cpio and correctly avoid duplicate config lines.
This commit is contained in:
Jarrod Johnson 2020-07-30 15:20:53 -04:00
parent ac19f093fd
commit 2ade557b3e

View File

@ -71,7 +71,7 @@ def local_node_trust_setup():
with open(certfile, 'w') as certout:
certout.write(cert)
with open('/etc/ssh/sshd_config', 'r') as sshconf:
currconfig = sshconf.read().split()
currconfig = sshconf.read().split('\n')
for conline in currconfig:
conline = conline.strip()
neededlines.discard(conline)
@ -166,8 +166,9 @@ def initialize(cmdset):
didsomething = True
install_tftp_content()
if cmdset.l:
didsomething = True
local_node_trust_setup()
if not didsomething:
sys.exit(0)
if not didsomething:
sys.stderr.write('Nothing was done, use initialize -i for '
'interactive mode, or see initialize -h for more options\n')