Skip to content
Snippets Groups Projects
Commit c0d8fc0d authored by cody burkard's avatar cody burkard
Browse files

wait until sshd has started on each host

parent ec26c749
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,16 @@ def sshd( network, cmd='/usr/sbin/sshd', opts='-D',
connectToRootNS( network, switch, ip, routes )
for host in network.hosts:
host.cmd( cmd + ' ' + opts + '&' )
# wait until each host's sshd has started up
remaining = list( network.hosts )
while True:
for host in tuple( remaining ):
if 'sshd is running' in host.cmd( 'service ssh status' ):
remaining.remove( host )
if not remaining:
break
print
print "*** Hosts are running sshd at the following addresses:"
print
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment