Revision c0d8fc0d

View differences:

examples/sshd.py
59 59
    connectToRootNS( network, switch, ip, routes )
60 60
    for host in network.hosts:
61 61
        host.cmd( cmd + ' ' + opts + '&' )
62

  
63
    # wait until each host's sshd has started up
64
    remaining = list( network.hosts )
65
    while True:
66
        for host in tuple( remaining ):
67
            if 'sshd is running' in host.cmd( 'service ssh status' ):
68
                remaining.remove( host )
69
        if not remaining:
70
            break
71

  
62 72
    print
63 73
    print "*** Hosts are running sshd at the following addresses:"
64 74
    print

Also available in: Unified diff