20 |
|
|
21 |
my $listen_port = 4444; |
my $listen_port = 4444; |
22 |
|
|
23 |
my $node_path = '/tmp/client.pl'; |
my $node_path = $0; |
24 |
|
$node_path =~ s{server.pl}{client.pl}; |
25 |
|
|
26 |
my $lsn = IO::Socket::INET->new(Listen => 1, LocalPort => $listen_port, Reuse => 1) or die $!; |
my $lsn = IO::Socket::INET->new(Listen => 1, LocalPort => $listen_port, Reuse => 1) or die $!; |
27 |
my $sel = IO::Select->new($lsn); |
my $sel = IO::Select->new($lsn); |
54 |
my $node_port = 4000; |
my $node_port = 4000; |
55 |
|
|
56 |
foreach my $host ( @cloud ) { |
foreach my $host ( @cloud ) { |
57 |
system "echo $node_path | cpio --create --dereference | ssh -T -F $cloud_path.ssh $host cpio --extract --make-directories --unconditional"; |
system "echo $node_path | cpio --create --dereference | ssh -T -F $cloud_path.ssh $host cpio --extract --make-directories --unconditional --verbose"; |
58 |
fork_node( $node_port++, $host ); |
fork_node( $node_port++, $host ); |
59 |
} |
} |
60 |
|
|